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=0.6 required=5.0 tests=BAYES_40,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: "Robert I. Eachus" Subject: Re: Ada Calendar oddity Date: 2000/06/03 Message-ID: <393934AF.E04C034A@earthlink.net>#1/1 X-Deja-AN: 630631700 Content-Transfer-Encoding: 7bit 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> <39230A82.CFA6E18D@earthlink.net> <3924B35E.DC0C9CDF@acenet.com.au> <8g8od2$9o6$1@nnrp1.deja.com> <392869F0.D88F056A@acenet.com.au> X-Accept-Language: en,pdf Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 960050270 63.24.57.148 (Sat, 03 Jun 2000 09:37:50 PDT) Organization: The MITRE Corporation MIME-Version: 1.0 NNTP-Posting-Date: Sat, 03 Jun 2000 09:37:50 PDT Newsgroups: comp.lang.ada Date: 2000-06-03T00:00:00+00:00 List-Id: Geoff Bull wrote: > Maybe, but I can't use Ada.Calendar to represent dates more than > ~ +/- 100 years from today's date. > It is beyond me why I need to create my own date package if I want to > do more than look at today's date First of all, using Time_Of, Split, and Year for dates in the early 20th century gets increasingly iffy, since conversions from the Julian to the Gregorian calendar occurred at different times around the world. The hard problem is to provide meaningful conversions of values of Calendar.Time to Gregorian dates and vice-versa. Not only is there a programming programming, but of converting "old" dates correctly is not easy. I can fairly easily whip up a child package containing versions of Split and Time_Of with an extra parameter (Julian or Gregorian), and leave it up to the user to figure out when to use what, but that alone is not enough. Which is the first day of the year? Julius Caesar agreed reluctantly to January 1 instead of the Ides of March, but even in colonial America, some people used March 20th or other spring solstice dates. A more interesting version date package would have a location parameter, and embed the different date rules for various locales. (Sweden is particularly messy.) Just specialing to the country is not enough, the area that is now the United States had five different calendar conversions, actually six since you have to count the French Revolutionary calendar. Also as you go back in time beyond the establishment of the Julian calendar, there are anomalies in the Julian calendar. Everyone knows that there was no year zero, but Ceaser Agustus also messed up the length of the months at about that time. And Julius began the new calendar with two odd length months. Projecting into the future is even more difficult. When will there next be a change in the calendar? The length of the day is changing due to the tidal influence of the moon, and in any case the Gregorian calendar is drifting anyway. Will 3000 be a leap year? Or is 4000 a better choice? It might be reasonable to decide that soon, but will the Gregorian calendar even be in use a thousand years from now? A few years back, the so called World Calendar, with two intercalciary days was proposed so that holidays would occur on the same day of the week every year. (In the US, we seem to have used a different method of accomplishing that.) The Chinese and Islamic calendars are still in widespread use, and who knows what new calendars will be proposed. (The Hebrew calendar is still used as well, but mostly for religous purposes. Every bill passed by the US Congress has a date since July 4th 1776, but only a few people pay attention now. Early on for the United States, it was important to do that, since not everyone was using the same calendar.)