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,cfd23c10fd537a80 X-Google-Attributes: gid103376,public From: randhol+nospam@pvv.org (Preben Randhol) Subject: Re: Ada Calendar oddity Date: 2000/05/10 Message-ID: #1/1 X-Deja-AN: 621576533 References: <39176D85.603D7AEC@research.canon.com.au> <39178DEA.FD2C20FA@research.canon.com.au> <8f92o1$6v$1@nnrp1.deja.com> <3918BB77.693C70D6@research.canon.com.au> <8fahfv$mgt$1@nnrp1.deja.com> X-Complaints-To: usenet@itea.ntnu.no X-Trace: kopp.stud.ntnu.no 957968373 12869 129.241.83.82 (10 May 2000 14:19:33 GMT) Organization: Norwegian university of science and technology User-Agent: slrn/0.9.6.2 (Linux) NNTP-Posting-Date: 10 May 2000 14:19:33 GMT Newsgroups: comp.lang.ada Date: 2000-05-10T14:19:33+00:00 List-Id: On Wed, 10 May 2000 13:44:39 GMT, Robert A Duff wrote: >randhol+nospam@pvv.org (Preben Randhol) writes: > >The reason for the range 1901..2099 is that leap year calculations are >simpler (and more efficient) in this range -- in this range, all years >divisible by 4 are leap years (including 2000). 1900 and 2100 are not >leap years. Ah I see. >What range would *you* suggest? Well that would perhaps depend on the implementation I guess. If one defined the upper limit to 9999 one would get a very big number trying to calculate the numbers of seconds from today until say year 7000. >If I were designing such a package, I would think about the number of >bits needed to represent the number of seconds (or nanoseconds?) in the >range. I think that in this case one needs to use another type for the birth and expiration date and convert from Ada.Calendar the date of today if one also wants the date when the license was issued. -- Preben Randhol -- [randhol@pvv.org] -- "Det eneste trygge stedet i verden er inne i en fortelling." -- Athol Fugard