Loading ...
Sorry, an error occurred while loading the content.

1368Re: [ISO8601] Re: Fraction of days, ISO-8601 2005

Expand Messages
  • Tex Texin
    Sep 14, 2005
    • 0 Attachment
      there is a third way:

      How about we slow the earth down just a smidgeon so seconds are evenly
      divisible by multiples of 2 to the n, for some reasonably large n?

      tex

      johnmsteele wrote:
      >
      > --- In ISO8601@yahoogroups.com, hjwoudenberg@a... wrote:
      > > When I round trip a date and time to fraction of days, the round
      > trip is
      > > only approximate the same.
      > >
      > > hjw
      >
      > Broadly, two ways of handling:
      >
      > Others have touched on the idea of using seconds, (which Unix does)
      > and there are variants:
      > 1) Just use seconds as the fundamental interval. When days are
      > needed, recover days as INT(SECS/86400) and seconds_within_day = MOD
      > (SECS, 86400)
      > 2) Use two words, one for days, one for seconds within days (may help
      > get over precision issues)
      > This would extend to any "tic" which is a submukltiple of a second,
      > like milliseconds. (You don't say how fine a time interval you must
      > resolve.
      >
      > The second option is to always round your answer. That requires
      > knowing an acceptable resolution and carrying enough precision.
      >
      > If 1 second resolution suffices, there are 86400 s/day, and you have
      > to carry AT LEAST 5 decimals in your day fraction. I would strongly
      > recommend a guard digit, so use six digits. If you want milliseconds,
      > nine digits in the fraction. Then when you go back to seconds, force
      > round it to the resolution you have chosen.
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >

      --
      -------------------------------------------------------------
      Tex Texin cell: +1 781 789 1898 mailto:Tex@...
      Xen Master http://www.i18nGuy.com

      XenCraft http://www.XenCraft.com
      Making e-Business Work Around the World
      -------------------------------------------------------------
    • Show all 8 messages in this topic