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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,6b85fea93f20b683 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-27 22:26:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!news.tele.dk!small.news.tele.dk!204.52.135.42!nntp1.hal-pc.org!attdl1!attdl2!attsl2!attla2!ip.att.net!attbi_feed3!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail Message-ID: <3D1BF397.CC974E8E@attbi.com> From: Mark Biggar X-Mailer: Mozilla 4.79 [en]C-{C-UDP; EBM-SONY1} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Timetype References: <7CKS8.3774$t4.9720@nntpserver.swip.net> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 12.235.88.57 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc52.ops.asp.att.net 1025241967 12.235.88.57 (Fri, 28 Jun 2002 05:26:07 GMT) NNTP-Posting-Date: Fri, 28 Jun 2002 05:26:07 GMT Organization: AT&T Broadband Date: Fri, 28 Jun 2002 05:26:07 GMT Xref: archiver1.google.com comp.lang.ada:26757 Date: 2002-06-28T05:26:07+00:00 List-Id: Bj�rn Lundin wrote: > > Hello1 > Can anyone explain this to me? > > cut from a-calend.ads > -- Declarations representing limits of allowed local time values. Note that > -- these do NOT constrain the possible stored values of time which may well > -- permit a larger range of times (this is explicitly allowed in Ada 95). > > subtype Year_Number is Integer range 1901 .. 2099; > > Does it mean that i can write an application dealing with historical dates > using the time_type? > > It seems to me that a date like 05-Jun-1712 would cause > constraint_error. > > Does anyone know the reason for this small range of years in > the timetype? Yes, this range allows using the expression (year mod 4 = 0) to test test for leap years. BTW taking your example date, which one do you mean? There is a 11 day difference between 05-jun-1712 in England and its colonies and that date in most of Europe. England didn't convert to the Gregorian calendar until 1752, while most of Catholic europe converted in the 1500's. Russia didn't convert until the 1920's, so even Ada's year range can cause problems with historical dates. The standard writers didn't want to deal with the mess that the calendar is in. -- Mark Biggar mark.a.biggar@attbi.com