From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7f5b20ce91c7fdaf X-Google-Attributes: gid103376,public From: Mike Stark Subject: Re: Julian Dates package? Date: 1997/01/08 Message-ID: <32D36A52.5925@gsfc.nasa.gov>#1/1 X-Deja-AN: 208581453 references: <32CFFA13.5BF8@ibm.net> content-type: text/plain; charset=us-ascii organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 3.0 (Macintosh; I; 68K) Date: 1997-01-08T00:00:00+00:00 List-Id: Keith Thompson wrote: > > Mike Stark 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 <*> > 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