From: Mike Stark <michael.e.stark@gsfc.nasa.gov>
Subject: Re: Julian Dates package?
Date: 1997/01/08
Date: 1997-01-08T00:00:00+00:00 [thread overview]
Message-ID: <32D36A52.5925@gsfc.nasa.gov> (raw)
In-Reply-To: E3o3ED.C99@thomsoft.com
Keith Thompson wrote:
>
> Mike Stark <michael.e.stark@GSFC.NASA.GOV> wrote:
> > I suggest using package Calendar, since it provides subtraction operator
> > for two absolute times, yielding elapsed times. To compute number of
> > days, create a birthdate and current date of type calendar.time, with
> > the seconds of day set to zero. This will give you a (fixed point)
> > number of seconds. Divide that number by 86,400 and you now have
> > the number of days.
>
> That's not guaranteed to work. The subtraction operation returns a
> result of type Duration, which is a fixed-point type with a minimum range
> of -86400.0 .. +86400.0 (i.e., +/- 1 day). Thus, you can't portably
> subtract two Calendar.Time values more than a day apart.
>
> --
> Keith Thompson (The_Other_Keith) kst@aonix.com <http://www.aonix.com> <*>
> TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix
> 10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2706
> "SPOON!" -- The Tick
OOPS! You are absolutely right! We have a time utilities package that
exports a time type that is valid from 1901 through 2099, the same range
as Calendar.TIME, and allows the computation of elapsed time as a
floating point number of seconds. If anyone is interested in our time
packages feel free to send me an e-mail.
Mike
next prev parent reply other threads:[~1997-01-08 0:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-01-05 0:00 Julian Dates package? Jay Joiner
[not found] ` <01bbfb55$c9dcbfe0$5e2d5c8b@jerryware>
1997-01-06 0:00 ` Mike Stark
1997-01-09 0:00 ` Gautier
1997-01-13 0:00 ` Michael & Amy Hartsough
1997-01-08 0:00 ` Fintan
1997-01-08 0:00 ` Keith Thompson
1997-01-08 0:00 ` Mike Stark [this message]
1997-01-08 0:00 ` Robert Dewar
1997-01-09 0:00 ` Mats Weber
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox