comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Software Engineering News Brief
Date: 1996/11/17
Date: 1996-11-17T00:00:00+00:00	[thread overview]
Message-ID: <dewar.848230046@merv> (raw)
In-Reply-To: 56lvss$r82@mulga.cs.mu.OZ.AU


Fergus said

  "I don't think it is a highly specialized requirement.  I think the
  requirement for a generic date type the works over a large range of
  dates is quite common.  Many programs let users enter dates, and
  putting strict requirements on the dates entered is not unlike assuming
  that no-one will ever want to enter a line with more than 80 characters."

Almost all programs that let users enter dates will want to consider
a date from the 25th century as illegal, just as illegal as the 30th of
February. It is indeed a specialized requirement to need dates very far
from the present. I certainly have never written such a program, and I
have written MANY programs that handle dates!

  "Gregorian dates aren't tricky, the change-over from other systems is tricky.
  That's why Paul Eggert suggested supporting Gregorian dates only, even
  for dates before the Gregorian system was used."

Well I know that's what he said, but I thought it must be a slip, because
it is so obviously an undesirable suggestion. To accept dates before the
18th century without comment or error, and then misinterpret them seems
highly error prone. Any program that wants to deal with dates before the
switch over must surely worry for itself about how to deal with this
situation. If I have a program that tells me the day of the week for any
date, and I use it to see what day of the week the Magna Carta was signed,
I either want the right answer, or an error, I certainly do NOT want to
get an incorrect answer corresponding to what the day would have been
had the Pope switched over the dates much earlier!

Also, dates that go outside the Ada range are tricky for another reason, since
they need geopolitical normalization in any case. The question of whether a
year is a leap year or not is not a scientific or astronomical one, it is a
political one, since it depends on the laws of the country involved. All
countries agree for the Ada range of dates, but when you wander outside
this range, countries will disagree unless they change their laws. Again,
deciding whether you want the date according to the current law, or according
to some other scheme, is surely something a program must decide for itself.

Dates are not as simple as you think! In particular, I am pretty sure that
when people talk about Gregorian dates, they do not mean what they say (i.e.
they are not talking about dates according to the scheme that Pope Gregory
decreed). That again is because the system of leap years has changed since
then, so that in some countries the laws of the country do not correspond
to Gregorian dates.

For example, I know the rule that every 100 years is not a leap year, except
that every 400 years is a leap year, but I do not know if this corresponds to
the current legislation of the US. There are also higher order corrections
proposed, so if you want to do a program that converts from Star Dates to
standard dates, you will have to find out the details of Federation legislation
regarding dates first.





  reply	other threads:[~1996-11-17  0:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-05  0:00 Software Engineering News Brief tmoran
1996-11-05  0:00 ` jimgregg
1996-11-05  0:00 ` Robert Dewar
1996-11-07  0:00   ` Stefan.Landherr
1996-11-11  0:00     ` Robert Dewar
1996-11-06  0:00 ` Tom Reid
1996-11-07  0:00   ` Robert Dewar
1996-11-07  0:00   ` Norman H. Cohen
1996-11-08  0:00   ` Robert I. Eachus
1996-11-09  0:00     ` Paul Eggert
1996-11-11  0:00       ` Norman H. Cohen
1996-11-16  0:00       ` Robert Dewar
1996-11-17  0:00         ` Fergus Henderson
1996-11-17  0:00           ` Robert Dewar [this message]
1996-11-17  0:00             ` Larry J. Elmore
1996-11-17  0:00               ` Robert Dewar
1996-11-18  0:00                 ` Keith Thompson
1996-11-18  0:00               ` Norman H. Cohen
1996-11-19  0:00                 ` Frank Manning
1996-11-18  0:00               ` Larry Kilgallen
1996-11-18  0:00                 ` Robert Rodgers
1996-11-18  0:00             ` Dave Sparks
1996-11-18  0:00             ` Mark A Biggar
1996-11-24  0:00             ` Paul Eggert
1996-11-24  0:00               ` Robert Dewar
1996-11-25  0:00                 ` Paul Eggert
1996-11-18  0:00         ` Matt Kennel
1996-11-19  0:00           ` Martin Tom Brown
1996-11-19  0:00           ` Keith Thompson
1996-11-21  0:00   ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
1996-11-12  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1996-11-09  0:00 tmoran
1996-11-09  0:00 ` Robert Dewar
1996-11-07  0:00 tmoran
1996-11-07  0:00 ` Robert Dewar
     [not found] <55t882$9m@news2.delphi.com>
1996-11-07  0:00 ` Robert Dewar
1996-11-01  0:00 Software Engineering News
1996-11-01  0:00 ` Adam Beneschan
1996-11-05  0:00 ` David Bradley
1996-11-05  0:00   ` Larry Kilgallen
1996-11-05  0:00     ` Steve Jones - JON
1996-11-06  0:00   ` Ed Falis
1996-11-06  0:00 ` John Cosby
     [not found] ` <55rmsc$2ee$1@shade.twinsun.com>
1996-11-07  0:00   ` caip.rutgers.edu!halasz
replies disabled

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