comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@earthlink.net>
Subject: Re: Ada Calendar oddity <was Re: C date package>
Date: 2000/05/17
Date: 2000-05-17T00:00:00+00:00	[thread overview]
Message-ID: <39230A82.CFA6E18D@earthlink.net> (raw)
In-Reply-To: wccn1lyjz94.fsf@world.std.com

Robert A Duff wrote:
  
> 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.
 
   True, but that was the reason it was that way in Ada 83, when
avoiding the Y2K bug was a big deal.   Incidently, note that even in
that range there are countries that switched from the Julian to the
Gregorian calendar, so dates in early 1900's have to be taken with a
grain of salt.

   There was some discussion of changing the range for the year subtype
in
Ada 95, but it was felt to be unnecessary.  However, several changes in
the details were made so that Ada.Calendar.Time does not have an imposed
limit.
This was felt to be a minor upwardly compatible change, while forcing
existing compilers to change the underlying types to support some fixed
wider range would have imposed much more work.  This allows a Split
procedure (probably a in child package of Calendar) to be provided by an
implementation which supports a wider range of years.  Note also that it
would be nice to have child packages for other calendars, such as
Chinese,
Japanese, Jewish, and Muslim.

   I have done some work on how to provide such packages, but there are
serious problems of definition if you try to extend the date ranges
significantly.  It doesn't make much sense to take Gregorian dates back
before the 16th century, but the Julian calendar needs to carefully deal
with the lack of a year zero, and there have been several calendar
"reforms" which moved things around.  It is nice to be able to use the
same date as someone living in that era would have--but it is not a very
easy job.  In some cases there are suspected mis-correlations of
hundreds of years.

   By Ada0X or Ada1Y or whatever, there should be a much wider agreement
on  how the Ada.Calendar.Year subtype should be redefined, and maybe on
a rich set of subpackages to deal with other calendars.




  parent reply	other threads:[~2000-05-17  0:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <l0313030eb53d1408aee7@[144.205.16.58]>
2000-05-09  0:00 ` C date package Geoff Bull
2000-05-09  0:00   ` Geoff Bull
2000-05-09  0:00     ` Robert Dewar
2000-05-10  0:00       ` Geoff Bull
2000-05-10  0:00         ` Robert Dewar
2000-05-10  0:00           ` Ada Calendar oddity <was Re: C date package> Preben Randhol
2000-05-10  0:00             ` Robert A Duff
2000-05-10  0:00               ` Preben Randhol
2000-05-10  0:00                 ` Charles Hixson
2000-05-11  0:00                   ` Geoff Bull
2000-05-11  0:00                     ` Charles Hixson
2000-05-12  0:00                       ` Geoff Bull
2000-05-17  0:00               ` Robert I. Eachus [this message]
2000-05-19  0:00                 ` Geoff Bull
2000-05-19  0:00                   ` Robert I. Eachus
2000-05-21  0:00                     ` Robert Dewar
2000-05-21  0:00                   ` Robert Dewar
     [not found]                     ` <392869F0.D88F056A@acenet.com.au>
2000-05-22  0:00                       ` Tarjei Tj�stheim Jensen
2000-05-27  0:00                         ` Reinert Korsnes
2000-05-27  0:00                           ` Tarjei Tj�stheim Jensen
2000-06-03  0:00                       ` Robert I. Eachus
2000-05-10  0:00             ` Tarjei Tj�stheim Jensen
2000-05-11  0:00               ` Geoff Bull
2000-05-11  0:00                 ` Gautier
2000-05-12  0:00                   ` Geoff Bull
2000-05-12  0:00                     ` Gautier
2000-05-11  0:00                       ` Al Christians
2000-05-11  0:00               ` Charles Hixson
2000-05-11  0:00                 ` Tarjei Tj�stheim Jensen
2000-05-12  0:00                   ` Charles Hixson
2000-05-12  0:00                     ` Tarjei Tj�stheim Jensen
2000-05-10  0:00           ` C date package Ken Garlington
2000-05-10  0:00             ` Geoff Bull
2000-05-10  0:00           ` Geoff Bull
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox