comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: Y2K Issues
Date: 1998/10/28
Date: 1998-10-28T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.98Oct28154346@spectre.mitre.org> (raw)
In-Reply-To: 717kpq$7cv$1@platane.wanadoo.fr

In article <717kpq$7cv$1@platane.wanadoo.fr> "Jean-Pierre Rosen" <rosen.adalog@wanadoo.fr> writes:

 > You have to put some bounds somewhere. Allowing dates before 1600 for
 > example (actually 1543 ? not sure) is really asking for trouble
 > (that's when the Julian calendar switched to Gregorian).

   Ooooh boy is that asking for trouble.  I'm not going to try to
create a list of all the dates that various countries switched from
Julian to Gregorian calendars.  I'll just note that it spans five
centuries so far, and there are some countries that still don't use
EITHER Julian or Gregorian calendars.  Greece and Russia are two of
the countries that switched during the twentieth century.

 > Note that for genealogy, you may well need dates before that.

    Note that the problem is not with type Calendar.Time.  As Robert
Dewar pointed out for gnat, the underlying representation is probably
much wider than you need for genealogy or the like.  The problem is
that Year, Split, and Time_Of are defined in terms of the subtype
Year_Number.  Since it seems to be time to discuss enhancements to
Ada, why not a child package of Ada.Calendar like:

   package Ada.Calendar.Extended is

     subtype Year_Number is Integer range _implementation_defined_;
     ...
     function Year (Date: Time) return Year_Number;
     procedure Split(Date: in Time;
                     Year: out Year_Number;
                     Month: out Month_Number;
                     Day: out Day_Number;
                     Seconds: out Day_Duration);
     function Time_Of(Year: Year_Number;
                      Month: Month_Number;
                      Day: Day_Number;
                      Seconds: Day_Duration := 0.0);

   end Ada.Calendar.Extended;

   Of course, it is possible to write the body of such a package in an
implementation independent manner, but making it efficient requires
making it a child of Calendar.  Also, the only thing that has been
stopping me from proposing such a solution is a concern about how to
make use clauses reasonable. 

--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  reply	other threads:[~1998-10-28  0:00 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-19  0:00 Y2K Issues John J Cupak Jr
1998-10-19  0:00 ` Tucker Taft
1998-10-19  0:00   ` Joe Gwinn
1998-10-20  0:00     ` Joe Gwinn
1998-10-19  0:00 ` dewar
1998-10-19  0:00 ` Niklas Holsti
     [not found] ` <362B8D2F.802F42E6@lmco.com>
1998-10-20  0:00   ` Robert I. Eachus
1998-10-22  0:00     ` Mark Bennison
1998-10-22  0:00       ` dennison
1998-10-23  0:00         ` Robert I. Eachus
1998-10-20  0:00   ` dennison
1998-10-23  0:00     ` Michael F Brenner
1998-10-25  0:00   ` Michael Feldman
1998-10-26  0:00     ` dennison
1998-10-27  0:00       ` dewarr
1998-10-27  0:00         ` Tucker Taft
1998-10-27  0:00           ` Y2K Issues (well, not really...) Dave Wood
1998-10-28  0:00           ` Y2K Issues dennison
1998-10-28  0:00             ` Dave Wood
1998-10-27  0:00         ` John Herro
1998-10-26  0:00     ` Robert A Duff
1998-10-26  0:00       ` Joel Seidman
1998-10-26  0:00         ` Y2K Issues - Warning Off-Topic Al Christians
1998-10-27  0:00       ` Y2K Issues dewarr
1998-10-27  0:00     ` dewarr
1998-10-29  0:00       ` system
1998-10-29  0:00         ` Al Christians
1998-11-02  0:00         ` Marin David Condic
1998-11-04  0:00           ` Robert I. Eachus
1998-11-05  0:00             ` dewarr
1998-11-06  0:00               ` Jerry van Dijk
1998-11-07  0:00                 ` dewarr
1998-11-06  0:00                   ` Al Christians
1998-11-08  0:00                     ` Jerry van Dijk
1998-11-08  0:00                       ` dewarr
1998-11-06  0:00               ` Robert I. Eachus
1998-10-27  0:00 ` Gautier de Montmollin
1998-10-28  0:00   ` adam
1998-10-28  0:00     ` Al Christians
1998-10-29  0:00     ` Samuel Mize
1998-11-04  0:00     ` Robert I. Eachus
1998-10-28  0:00   ` Arthur Evans Jr
1998-10-28  0:00   ` dewar
1998-10-28  0:00     ` Gautier.DeMontmollin
1998-10-28  0:00       ` Jean-Pierre Rosen
1998-10-28  0:00         ` Robert I. Eachus [this message]
1998-10-29  0:00           ` Dale Stanbrough
1998-10-29  0:00             ` Tucker Taft
1998-10-29  0:00               ` dewar
1998-10-29  0:00                 ` Tucker Taft
1998-10-30  0:00                   ` dennison
1998-10-31  0:00                     ` dewarr
1998-11-02  0:00                       ` dennison
1998-10-30  0:00                 ` Dale Stanbrough
1998-10-30  0:00                 ` Matthew Heaney
1998-10-31  0:00                   ` dewar
1998-10-29  0:00             ` Samuel Mize
1998-10-29  0:00             ` Mark A Biggar
1998-10-28  0:00   ` adam
1998-10-29  0:00     ` Gautier.DeMontmollin
  -- strict thread matches above, loose matches on Subject: below --
1998-10-23  0:00 Condic, Marin D.
replies disabled

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