Re: [EXI LC comments] Date-Time alignment on binary

Hi Mohamed,

Thank you for reviewing the specification and providing us a valuable
feedback.

The primary reason why we combine hours and minutes in one component
in 11 bits as "hours * 60 + minutes", and also hours, minutes and seconds
as one component in 17 bits as "((hour * 60) + minutes) * 60 + seconds"
is that applications tend to manage these values as one, continuous value.

For example, hypothetical timezone (hour, minute) = (5, 15) can be
combined as 5 * 60 + 15 = 315 minutes. This combined value is directly
useful for operations such as normalizing local time into UTC time.
Similarly, given two combined time values (hour, minute, seconds) =
(9, 30, 45) and (6, 20, 25), you can calculate the difference just by
subtracting one from the other as 34245 - 22825 = 11420 seconds.
To facilitate the encoding and decoding of these combined values,
we chose the 60 as the multipler instead of 64. We believe that the
added cost of computation is negligible in broader context and may
be outweighted by the merit described above in common use cases
employs direct language bindings.

Thanks!

-taki

Received on Tuesday, 7 October 2008 21:14:26 UTC