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/06 Message-ID: <32D0CB2A.15EB@gsfc.nasa.gov>#1/1 X-Deja-AN: 208065837 references: <32CFFA13.5BF8@ibm.net> <01bbfb55$c9dcbfe0$5e2d5c8b@jerryware> 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-06T00:00:00+00:00 List-Id: Jerry van Dijk wrote: > > Jay Joiner wrote in article > <32CFFA13.5BF8@ibm.net>... > > > I am interested in doing a Biorythm calculator in Ada and I need an > Ada > > package that can take the difference between two dates (birthdate and > > today). 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. If you have any more questions, feel free to e-mail me. > > I thought Julian dates were mainly used for astronomy and such ? > > Jerry. That is correct. However, in the systems we use at Goddard's Flight Dynamics Division we model times as seconds from a fixed reference date. With spacecraft it is important to include leap seconds, because each leap second you neglect can translate to 7 or 8 kilometers of along track error in your orbit computation. I don't think leap seconds matter much for a biorhythms program, though ;) Mike