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: kst@aonix.com (Keith Thompson) Subject: Re: Julian Dates package? Date: 1997/01/08 Message-ID: #1/1 X-Deja-AN: 208583634 sender: news@thomsoft.com (USENET News Admin @flash) x-nntp-posting-host: pulsar references: <32CFFA13.5BF8@ibm.net> organization: Aonix, San Diego, CA, USA newsgroups: comp.lang.ada originator: kst@pulsar Date: 1997-01-08T00:00:00+00:00 List-Id: 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