From tom_van_vleck@taligent.com Tue Sep 19 11:58:19 CDT 1995
Article: 116364 of alt.folklore.computers
Xref: uchinews alt.folklore.computers:116364
Path: uchinews!vixen.cso.uiuc.edu!news.uoregon.edu!premier3.premier.net!uunet!in1.uu.net!taligent!kip-51.taligent.com!user
From: tom_van_vleck@taligent.com (Tom Van Vleck)
Newsgroups: alt.folklore.computers
Subject: Re: Easter
Date: Mon, 18 Sep 1995 23:11:59 -0700
Organization: Multicians
Lines: 46
Message-ID: <tom_van_vleck-1809952311590001@kip-51.taligent.com>
References: <43kl9u$egv@cantua.canterbury.ac.nz>
NNTP-Posting-Host: kip-51.taligent.com
Status: RO

E.Havelaar@Regy.Canterbury.Ac.NZ (Ed Havelaar) wrote:
>I need to know the date of Easter, 1938 and Easter 1940. 

Get a copy of _Software Practice & Experience_, 20, 9, Sept 1990.
A wonderful article by Dershowitz and Reingold, titled "Calendrical
Calculations," will tell you more than you need to know.

The function they give for easter is
(defun easter (year) ;; absolute date of easter in gregorian year
 (let* ((century (1+ (quotient year 1000)))
        (shifted-epact (mod (+ 14 (* 11 (mod year 19)) ;; Nicaean rule
                               (- (quotient (* 3 century) 4))
                               (quotient (+ 5 (* 8 century)) 25)
                               (* 30 century))
                        30))
        (adjusted-epact (if (or (= shifted-epact 0)
                                (and (= shifted-epact 1) (< 10 (mod year 19))))
                         ;; then
                            (1+ shifted-epact)
                         ;; else
                           shifted-epact))
        (paschal-moon ;; day after full moon on or after march 21
          (- (absolute-from-gregorian (list 4 19 year)) adjusted epact)))
 ;; return the Sunday following the paschal moon
 (Kday-on-or-before (+ paschal-moon 7) 0)))

where
(defun Kday-on-or-before (date k) ;; k=0 for sunday, etc
 (- date (mod (- date k) 7)))

Actually, if you have time for a war story...

In 1972, I wrote a program for Multics that created wall calendars. I
wanted to find the date of Easter, so I went to the library, and
discovered a simple algorithm for calculating when Easter came in about 7
steps, attributed to Gauss. I copied it, used it in my program, and tested
a few years to make sure it worked. The program worked fine for years, and
then I got a trouble report in late 1979, that it was off by a week for
Easter 1980. Sure enough, it was wrong. 
Dennis Capps kindly researched the fix, and included a page-long comment in the
revised program, quoting an article from the _American Mathematical
Monthly_ that said that Gauss's algorithm failed occasionally: the first
time since he wrote it was 1980.

What I learned was that others may get by for 400 years with trying a few
test cases, but If *you* try it, you'll get caught.


From X Sun Jun  6 11:30:18 CDT 1993
Article: 41318 of alt.folklore.computers
Xref: uchinews alt.folklore.urban:77323 alt.folklore.computers:41318
Newsgroups: alt.folklore.urban,alt.folklore.computers
Path: uchinews!ux1.cso.uiuc.edu!howland.reston.ans.net!noc.near.net!black.clarku.edu!vax.clarku.edu!lrudolph
From: lrudolph@vax.clarku.edu
Subject: Render unto Julius?
Message-ID: <6JUN93.02274310@vax.clarku.edu>
Sender: news@black.clarku.edu (USENET News System)
Organization: Clark University
Date: 6 JUN 93 02:27:43 GMT
Lines: 26
Status: R

Here's a twist on the Julian/Gregorian calendar that I haven't seen
in any of the recent rehashings thereof.  I quote from Ralph Whitlock's
column in the June 6, 1993, Guardian Weekly (a British paper, if anyone
can't tell).

--begin quotation--

Unlikely though it may appear at first sight, one of the staunchest
supporters of the old calendar and the customs that go with it is 
the Inland Revenue!  We should be reminded of this every time we
receive one of those notices requiring statements of our income up to
April 5th.  Why April 5th?  In times past Lady Day, which had a greater
importance than at present, was, even more often than Michaelmas, the
date on which farm tenancies began and terminated and was therefore
the end of the financial year.  The tax collector followed the practice
of the country's main industry, agriculture.

Lady Day is March 25th, to which 11 added days brings us to April 5th.
If the tax office had retained March 25th as the end of its financial
year it would presumably have ``lost'' 11 days and therefore 11 days'
revenue!  That was not to be thought of, even in 1752.  So the apparently
meaningless date, April 5, became the end of the official financial year.

--end quotation--

Lee "still talking about lost dates" Rudolph


From uchinews!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wupost!waikato.ac.nz!comp.vuw.ac.nz!gp.co.nz!zl2tnm!toyunix!don Fri Jan 10 21:51:31 CST 1992
Article: 17074 of alt.folklore.computers
Path: uchinews!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wupost!waikato.ac.nz!comp.vuw.ac.nz!gp.co.nz!zl2tnm!toyunix!don
From: don@zl2tnm.gp.co.nz (Don Stokes)
Newsgroups: alt.folklore.computers
Subject: Re: In the year 2000...
Message-ID: <224010@zl2tnm.gp.co.nz>
Date: 11 Jan 92 02:23:05 GMT
Sender: news@zl2tnm.gp.co.nz (GNEWS Version 2.0 news poster.)
Organization: The Wolery
Lines: 171
Status: R

mdh@gaya.gp.co.nz writes:

> Isn't it? My understanding is that if a year number is divisible by 4 it is 
> a leap year, except if it is divisible by 100, except when it is divisible 
> by 400. 2000 is divisible by 400, so it will be a leap year. That is, 
> unless there is an exception to the exception to the exception that I am 
> not aware of.

Correct.

A source in DEC sent me the following a while ago, which may amuse and/or
enlighten...  (I've got a feeling that references to RSX in the second part
of this should actually be VMS, as RSX doesn't actually know about years
after 1999, but this is how I received it.)

(since I didn't have an RSX support agreement at the time, I'm assuming
 that this is in the public domain... so sue me! 8-)



RSX Will Incorrectly Handle The Year 2000   [RSX]


COPYRIGHT (c) 1988, 1989, 1990 by Digital Equipment Corporation.
ALL RIGHTS RESERVED. No distribution except as provided under contract.

LAYERED PRODUCT/COMPONENT: Executive         OP/SYS: RSX-11

LAST TECHNICAL REVIEW: 24-FEB-1989

SOURCE: Customer Support Center/Colorado Springs


PROBLEM/SYMPTOM: (SPR ICA-10389 submittal)

The GET TIME PARAMETERS directive (GTIM$ or Fortran GETTIM) returns the
year as an offset of 1900.  When the system date changes from 1999 to
2000 this offset then becomes 100.

The SET DAY DCL command (or TIM MCR command) only allows the year to be
entered in abbreviated, two digit form.  Rebooting the system after the
year 2000 will thus cause the year offset returned to lie in the range
0-99.

Any commands using the /AFTER qualifier will also only accept a two
digit year.  For instance, you cannot submit a batch file to be
processed in the year 2000 during the year 1999 as it will run
immediately since the year 2000 must be specified as 00 which will be
less than the current 99 offset.


SOLUTION (SPR response):

Yes, there will be a problem in the year 2000 with the two digit dates.
This is part of a long and interesting history and evolution. When the
PDP-8 was first introduced, it ran an operating system called OS/8. The
designers of OS/8 never considered that their meager little operating
system would last for years and years, so they stored the year as a
single digit. An octal digit no less. (Or so the story goes). When 1977
rolled around, it was foreseen that the success of OS/8 would soon
cause a major problem. A massive effort was launched to repair the
damage and the result was a product which could survive the onslaught
of "the decimal years". This product was called OS/78, and now you know
why.

When we built the PDP-11 and its myriad operating systems, we fixed the
problem. We used two digits for the year. This should hold us, or so we
thought.

For the moment, we do not intend to worry about this problem. We would
like you to resubmit this SPR in 1999, however. Please submit it early
in the year, so that we will have adequate time to plan "RSX-2000M".

VMS, by the way uses a date of at least four digits, so you may need to
mark your calendar for January of 9999.

When we first saw your problem statement, we were enthralled that this
might be a duplicate of a rather famous SPR regarding why RSX treats
2000 as a leap year. But alas, you have merely discovered a real problem.
We have elected to include the answer to the other question, just in case
you are curious:

Thank you for your forward-looking SPR.

Various system services assume that the year 2000 will be a leap year.
Although one can never be sure of what will happen at some future time,
there is strong historical precedent for presuming that the present
Gregorian calendar will still be in affect by the year 2000. Since we
also hope that RSX will still be around by then, we have chosen to
adhere to these precedents.

The purpose of a calendar is to reckon time in advance, to show how
many days have to elapse until a certain event takes place in the
future, such as the harvest or the release of RSX V5. The earliest
calendars, naturally, were crude and tended to be based upon the
seasons or the lunar cycle.

The calendar of the Assyrians, for example, was based upon the phases
of the moon. They knew that a lunation (the time from one full moon
to the next) was 29 1/2 days long, so their lunar year had a duration
of 364 days. This fell short of the solar year by about 11 days.
(The exact time for the solar year is approximately 365 days, 5 hours,
48 minutes, and 46 seconds.) After 3 years, such a lunar calendar
would be off by a whole month, so the Assyrians added an extra month
from time to time to keep their calendar in synchronization with the
seasons.

The best approximation that was possible in antiquity was a 19-year
period, with 7 of these 19 years having 13 months (leap months). This
scheme was adopted as the basis for the religious calendar used by the
Jews. (The Arabs also used this calendar until Mohammed forbade
shifting from 12 months to 13 months.)

When Rome emerged as a world power, the difficulties of making a
calendar were well known, but the Romans complicated their lives
because of their superstition that even numbers were unlucky. Hence
their months were 29 or 31 days long, with the exception of February,
which had 28 days. Every second year, the Roman calendar included an
extra month called Mercedonius of 22 or 23 days to keep up with the
solar year.

Even this algorithm was very poor, so that in 45 BC, Caesar, advised
by the astronomer Sosigenes, ordered a sweeping reform. By imperial
decree, one year was made 445 days long to bring the calendar back in
step with the seasons. The new calendar, similar to the one we now
use was called the Julian calendar (named after Julius Caesar). It's
months were 30 or 31 days in length and every fourth year was made a
leap year (having 366 days). Caesar also decreed that the year would
start with the first of January, not the vernal equinox in late March.

Caesar's year was 11 1/2 minutes short of the calculations recommended
by Sosigenes and eventually the date of the vernal equinox began to
drift. Roger Bacon became alarmed and sent a note to Pope Clement IV,
who apparently was not impressed. Pope Sixtus IV later became
convinced that another reform was needed and called the German
astronomer, Regiomontanus, to Rome to advise him. Unfortunately,
Regiomontanus died of the plague shortly thereafter and the plans died
as well.

In 1545, the Council of Trent authorized Pope Gregory XIII to reform
the calendar once more. Most of the mathematical work was done by
Father Christopher Clavius, S.J. The immediate correction that was
adopted was that Thursday, October 4, 1582 was to be the last day of
the Julian calendar. The next day was Friday, with the date of
October 15. For long range accuracy, a formula suggested by the
Vatican librarian Aloysius Giglio was adopted. It said that every
fourth year is a leap year except for century years that are not
divisible by 400. Thus 1700, 1800 and 1900 would not be leap years,
but 2000 would be a leap year since 2000 is divisible by 400. This
rule eliminates 3 leap years every 4 centuries, making the calendar
sufficiently correct for most ordinary purposes. This calendar is
known as the Gregorian calendar and is the one that we now use today.
(It is interesting to note that in 1582, all the Protestant princes
ignored the papal decree and so many countries continued to use the
Julian calendar until either 1698 or 1752. In Russia, it needed the
revolution to introduce the Gregorian calendar in 1918.)

This explains why RSX chooses to treat the year 2000 as a leap year.

Despite the great accuracy of the Gregorian calendar, it still falls
behind very slightly every few years. If you are very concerned about
this problem, we suggest that you tune in short wave radio station
WWV, which broadcasts official time signals for use in the United
States. About once every 3 years, they declare a leap second at which
time you should be careful to adjust your system clock. If you have
trouble picking up their signals, we suggest you purchase an atomic
clock (not manufactured by Digital and not an option at this time).


--
Don Stokes, ZL2TNM (DS555)                           don@zl2tnm.gp.co.nz


From uchinews!ncar!asuvax!cs.utexas.edu!utgpu!utzoo!sq!msb Wed Jan 15 20:18:53 CST 1992
Article: 17334 of alt.folklore.computers
Xref: uchinews alt.folklore.computers:17334 soc.history:8074 sci.astro:11767 soc.culture.british:13172
Path: uchinews!ncar!asuvax!cs.utexas.edu!utgpu!utzoo!sq!msb
From: msb@sq.sq.com (Mark Brader)
Newsgroups: alt.folklore.computers,soc.history,sci.astro,soc.culture.british
Subject: Calendar Changes (was: Gregorian Calendar Rationale)
Message-ID: <1992Jan15.212901.13189@sq.sq.com>
Date: 15 Jan 92 21:29:01 GMT
References: <kmrh7rINNjcj@grapevine.EBay.Sun.COM> <1992Jan10.132823.6442@ms.uky.edu> <MJD.92Jan10171422@saul.cis.upenn.edu>
Followup-To: soc.history
Organization: SoftQuad Inc., Toronto, Canada
Lines: 147
Status: R

As this now has little to do with computers, I've redirected followups to
soc.history, and added a cross-posting to sci.astro and soc.culture.british
just for this article.  Any readers of those groups not already familiar
with the basis of the Gregorian calendar (the system of leap years we now
use) may want to visit alt.folklore.computers for mjd@saul.cis.upenn.edu's
article, which this one is a followup to.

>     Not quite: The Gregorian calendar was introduced by Pope Gregory
> XIII in 1582 (although I believe that the divisible-by-400 rule didn't
> come in until a little later.)

Every source I've ever read about this in says that they did adopt it
immediately.  Certainly the Gregorian-calendar countries had only one
fewer leap year than the Julian-calendar countries between 1582 and 1752.

> England and its colonies made the
> change in 1752, necessitating the excision of still more days from the
> calendar.  As you've no doubt heard, tenants rioted then, complaining
> that they had paid a month's rent on a month that had only 20 days.

19 days.

And if that did happen, the tenants had every right to complain.  I have
recently obtained a copy of the Act of the British government -- 24 Geo.
2. c. 23 -- which changed the calendar used "in and throughout all his
Majesty's Dominions and Countries in Europe, Asia, Africa and America,
belonging or subject to the Crown of Great Britain".

The Act clearly specified that all financial transactions set up by
agreements preceding the calendar-change -- including all "Rent or Rents,
Annuity or Annuities, or Sum or Sums of Money whatsoever, which shall
become payable by Virtue or Consequence of any Custom, Usage, Lease, Deed,
Writing, Bond, Note, Contract or other agreement whatsoever" -- would
occur "at and upon the same respective natural Days and Times, as ...
would have happened in case this Act had not been made".  I've heard that
quarterly rent was more common in those days, but suppose a tenant custom-
arily paid the rent on the 1st of each month, O.S. (Old Style -- Julian
calendar).  Then, from October 1752 onwards he should have to pay the
same rent on the 12th of the month, N.S.

I said "should have to".  Of course, one can easily see the landlords
failing to follow the law here!  Either they wouldn't understand it
completely, or they would interpret it incorrectly to their own advantage
and hope the tenants wouldn't understand.


What I found even more interesting is that the same Act also changed
the first day of the year in England.  Until 1751, the year of the Act,
it was March 25.  That is, December 31, 1750, was followed by January 1,
1750; but March 24, 1750, was followed by March 25, 1751.  The year 1752,
however, began on January 1.  Thus in England the year 1752 was actually
shortened in two ways -- at the beginning and in the middle -- and was,
if I compute correctly, only 271 days long.  As "man cal" notes, UNIX's
cal command ignores this issue and assumes all years started in January.
The actual title of the Act is "An Act for Regulating the Commencement
of the Year; and for Correcting the Calendar now in Use".

The reason for this change of the year-start was that official practice,
which is what I was referring to in the preceding paragraph, had become
out of step with popular usage.  In practice people *were already* using
January 1 as the start of the year in England.  January 1 was also
already the official start of the year in Scotland, and was in general
use in continental Europe as well.  So the outdated official practice
was leading to a lot of errors and disputes.  (It must have been much
like what happens today when people associate dates with times that are
just past midnight.)

The information in the preceding paragraph comes from the Act itself, in
its preamble.  (Yes, it really omits Wales.)  Can anyone suggest further
reading on the topic of changes to the start of the year?


If there's sufficient interest, by the way, I'll consider typing in the
text of the Act.  It's about 3 pages long, plus associated tables related
to Easter and other religious holidays, which I will not type in.  Email me.


> Russia delayed the change until after the Revolution, which is why the
> anniversary of the October Revolution is in November.  Similarly, George
> Washington moved his birthday date forward so it would be 365 days from
> the previous birthday, which is why we celebrate Washington's birthday
> on 22 [February], when in fact he was born on 11 [February] 1732.

Correct practice according to the Act: "the Time of the Attaining the Age
of one and twenty Years, or any other Age requisite by any Law, Custom or
Usage, Deed, Will or Writing whatsoever, for the doing any Act, or for any
other Purpose whatsoever, by any Person or Persons now born, or who shall
be born before the said fourteenth Day of September [1752]" also remains
on the same "natural Date" as if the calendar had not changed.  Washington
became 21 years old on February 22, 1753.

A curiosity here is that, under the same rule, if Washington had lived
another 2 years, he should have changed his birthday *again*.  Since 1800
was a leap year O.S. but not N.S., in keeping with the "same natural Date"
rule his birthday should then have become February 23; and it would be
logical for Americans to celebrate it on February 24 from 1901 to 2100,
then on February 25 until 2200, and so on.

I have no idea as to how generally this was realized this by the time that
1800 came around, though; or for that matter whether some later amendment
might not have removed the requirement for a one-day shift affecting only
people born, or contracts signed, before the 1752 changeover.  There are
marginal notes in my copy of the Act referring to amendments, but I don't
have copies of the amendments.


As noted, Russia used the Julian calendar into this century -- and for
religious purposes, at least, some people still do, so that we see some
Christmas celebrations on January 6.  Surely the most interesting
transition, though, was that of Sweden.  The following is excerpted
(and copy-edited and reformatted) from an article that Anders Berglund
posted to what was then called net.bugs, back in May 1986.

| ... I couldn't resist the opportunity to force the peculiarities of
| the Swedish switch from Julian into Gregorian times onto you all,
| dear net-readers.
| 
| The scheme was ... [that] Sweden was to gradually adapt to the
| Gregorian style by dropping all leap days, starting with the
| year 1700!  Since this would bring us ONE day closer for every
| fourth year it also would mean that Sweden was to have a unique
| calendar for the FORTY years it would take to overbridge this ten-
| day time slip!!  Truly a solution of the "splendid isolation" type!
| 
| However, it didn't work out that way.  The king was away on endless
| war-tours in Russia and the government at home neglected to fulfill
| the plan (if there was a reason, I don't know it).  So, when 1704
| came along they happily enjoyed their leap day, and the same happened
| in 1708.
| 
| When 1712 was in sight someone obviously had got tired of this
| one-day-ahead-or-ten-days-after style.  It was decided to make an
| end to it by --listen to this!-- going BACK to Julian style!
| 
| This is why Sweden got two leap days in 1712, making a 30-day February! 
| Is there anything like this on record in any other country...?
| 
| The final change to Gregorian style, by the way, was made in 1753,
| when March 4 was immediately followed by March 15.
-- 
Mark Brader			"... one of the main causes of the fall of
SoftQuad Inc., Toronto		 the Roman Empire was that, lacking zero, they
utzoo!sq!msb			 had no way to indicate successful termination
msb@sq.com			 of their C programs."		-- Robert Firth

Original text in this article, and the quoted legislation, is in the
public domain.


From uchinews!vixen.cso.uiuc.edu!howland.reston.ans.net!math.ohio-state.edu!uunet.ca!geac!sq!msb Thu Nov 18 16:01:43 CST 1993
Article: 52049 of alt.folklore.computers
Xref: uchinews alt.folklore.urban:98886 alt.folklore.computers:52049 sci.skeptic:53231
Newsgroups: alt.folklore.urban,alt.folklore.computers,sci.skeptic
Path: uchinews!vixen.cso.uiuc.edu!howland.reston.ans.net!math.ohio-state.edu!uunet.ca!geac!sq!msb
From: msb@sq.sq.com (Mark Brader)
Subject: Re: Computer problems with 1999->2000 date
Message-ID: <1993Nov10.232717.14079@sq.sq.com>
Organization: SoftQuad Inc., Toronto, Canada
References: <2bmqgq$cd9@electra.saaf.se> <2bn1op$3d3@panix.com> <2bon5v$jfa@geraldo.cc.utexas.edu>
Date: Wed, 10 Nov 93 23:27:17 GMT
Lines: 277
Status: R

William H. Jefferys (bill@dorrit.as.utexas.edu) writes:
> The following countries switched on Oct 5/15 1582 (Oct 4 was the last day
> of the Julian calendar in these countries, the switch took place the
> next day): Italy, Poland, Portugal, Spain.

Here is a more detailed list, as posted to comp.lang.c (!) by Bob Douglas
(bob@black.ox.ac.uk) in 1992.

===========================================================================

                  Julian/Gregorian Calendar Changeover
                  ====================================

The Julian calendar was devised at the instigation of Julius Caesar and
come into use in 45 BC or 709 AUC although confusion reigned during its
first fifty or so years. It finally stabilized in 8 AD or 761 AUC. The
Julian calendar has just one rule

    (1) Every fourth year is a leap year. The first leap year was
        45 BC, so 1 BC was a leap year and hence so was 4 AD (there
        being no year zero: 1 BC is followed by 1 AD). Hence for years
        AD, if the year is divisible by 4, it is a leap year

Thus the Julian calendar assumes a year of exactly 365.25 days.

In fact the mean tropical year (used for fixing the seasons) is 365.242199
days, which means that the Julian year is about 11 minutes 14 seconds too
long, an error which grows to about a day in 133 years. Thus in 400 Julian
years there are about 3 days too many.

Hence in the sixteenth century Pope Gregory XIII authorized a revision of
the calendar, and decreed that

   (1) Centennial years should in future no longer be leap years
       unless they were divisible by 400 (i.e. 1600, 2000, 2400
       are leap years; 1700, 1800, 1900 are not). Non-centennial
       years should continue to be leap years if they are
       divisible by 4.

   (2) Thursday 4 October 1582 (Julian calendar) would be followed
       by Friday 15 October 1582 (Gregorian calendar). The gap of
       10 days corrected the accumulated error in the Julian
       calendar.

Thus the Gregorian calendar assumes a year of exactly 365.2425 days,
so it is about 26 seconds too long. This error will grow to a day in
about 3300 years, so we can safely leave future calendar corrections
to a (far) future generation.

Note: AUC - Ab urbe condita
            From the (traditional) founding of the city (of Rome) - 753 BC

==========================================================================

The above rules should make the decision about a year being a leap year
an easy one:

    Using the Gregorian calendar, a year (1 AD or later):

        - is a leap year if it is divisible by 400; otherwise

        - it is not a leap year if it is divisible by 100; otherwise

        - it is a leap year if it is divisible by 4; otherwise

        - it is not a leap year

    Using the Julian calendar:

        - a positive year (AD) is a leap year if it is divisible by 4

        - a negative year (BC) is a leap year if its absolute value
          less 1 is divisible by 4

    As C statements we have

        Gregorian:   leap = (year % 400 == 0) ||
                               (year % 100 != 0 && year % 4 == 0)

        Julian:      leap = (year > 0 ? year % 4 == 0 : (-year-1) % 4 == 0)

==========================================================================

    However, we are still not quite home and dry. To add to the confusion,
    the first day of the year has varied through the ages.

    In early Rome March was the first month of the year (hence SEPTember,
    OCTober, NOVember, DECember - months 7, 8, 9, 10); but in 153 BC,
    when consuls started entering office on 1 January, this became the
    first day of the official year.

    In Western Europe, in the Christian era, 1 January was gradually
    adopted as the first day of the year, but different places did
    this at widely different dates, and before this standardization
    there were several different starts to the year. For example

        (1) Italy, down to the 18-th century

                The Venetian new year started on the following 1 March
                The Pisan new year started on the preceding 25 March
                The Florentine new year started on the following 25 March
                In Rome various new years were used for different purposes

        (2) In England during the 14-th century the new year gradually
            changed from the preceding 25 December to the following
            25 March. Then, by the Act that established the Gregorian
            calendar, from 1753 the new year started on 1 January

        (3) Scotland (independent from England until the Act of Union
            in 1707) established 1 January as the first day of the year
            from 1600.

It is safe, I think, to asusme that all Gregorian calendar years start
on 1 January.

However, the effect of years that do not start on 1 January can be to
upset the calculation of a (Julian) leap year. For example, if years
start on the following 25 March (as for a long time they did in England),
then the day before 1 March 1664 is 29 February 1663 (what we should call
29 February 1664). Thus the year which started on 1 March 1663 is a leap
year although 1663 is not divisible by 4.

This problem can be avoided by regarding years as starting always on
1 January, of course, but when dealing with historical dates the
conversion to a 1 January year start depends on knowledge of the year
start locally in use at that date:

    With a Pisan year 1 June 1588 becomes 1 June 1587
    With a Florentine year 1 June 1588 stays 1 June 1588

    With a Pisan year 1 February 1588 stays 1 February 1588
    With a Florentine year 1 February 1588 becomes 1 February 1589

==========================================================================

By and large, Catholic countries adopted the Gregorian calendar at or
about the time Gregory's edict stated. Protestant countries didn't;
but sooner or later they had to conform as their calendars were getting
more and more out of step with the seasons as the centuries passed.

Below are (sometimes approximate) dates of calendar conversion for
many countries. Surprisingly, there seems to be considerable doubt
over when some areas changed. Information below is taken from

      Explanatory Supplement to the Astronomical Ephemeris
      and the American Ephemeris and Nautical Almanac

      Her Majesty's Stationary Office, London, 1961

This gives several other references, mainly obscure German works.

Where it is known exactly, the changeover is given in the form

      last Julian date - first Gregorian date

otherwise approximate dates (usually just years) are given.

Remember that many European countries had very different borders at the
time of the changeover to those they have now (e.g. Poland, Hungary).
There have been changes in political authority too. The German states
particularly formed just a linguistic area comprising (roughly) modern
Austria, Germany, Czechoslovakia and Switzerland; and different political
entities (and sometimes even the ecclesiastical and civil authorities in
one area) adopted the Gregorian calendar at different dates. See the
above reference for more details.

==========================================================================

Alaska                             Gregorian calendar adopted when the USA
                                   bought Alaska from Russia (18 October 1867)

Albania                            December 1912

American Colonies                  See Great Britain

Austria                            Different regions on different dates
                                        6 Oct 1583 - 16 Oct 1583
                                       15 Dec 1583 - 25 Dec 1583

Belgium                            Different authorities say
                                       15 Dec 1582 - 25 Dec 1582
                                       22 Dec 1582 -  1 Jan 1583

Bulgaria                           Different authorities say
                                       Sometime in 1912
                                       19 Mar 1916 -  1 Apr 1916

China                              Different authorities say
                                       19 Dec 1911 -  1 Jan 1912
                                       19 Dec 1928 -  1 Jan 1929

Czechoslovakia (i.e. Bohemia and Moravia)
                                    7 Jan 1584 - 17 Jan 1584

Denmark (including Norway)         19 Feb 1700 - 1 Mar 1700

Egypt                              1875

Estonia                            January 1918

Finland                            Then part of Sweden (q.v.)

France                             10 Dec 1582 - 20 Dec 1582

German States                      Different states on different dates:
                                       14 Feb 1583 - 24 Feb 1583
                                        5 Oct 1583 - 15 Oct 1583
                                        6 Oct 1583 - 16 Oct 1583
                                        3 Nov 1583 - 13 Nov 1583
                                        4 Nov 1583 - 14 Nov 1583
                                        5 Nov 1583 - 15 Nov 1583
                                       12 Nov 1583 - 22 Nov 1583
                                       17 Nov 1583 - 27 Nov 1583
                                        7 Jan 1584 - 17 Jan 1584
                                       13 Jan 1584 - 23 Jan 1584
                                        2 Jul 1584 - 12 Jul 1584
                                       17 Jun 1585 - 27 Jun 1585
                                       23 Aug 1610 -  2 Sep 1610   (a)
                                       14 Dec 1615 - 24 Dec 1615
                                       16 Mar 1631 - 26 Mar 1631
                                       19 Feb 1700 -  1 Mar 1700   (b)
                                   Note:
                                   (a) Prussia
                                   (b) Protestant Germany

Great Britain and Dominions         3 Sep 1752 - 14 Sep 1752

Greece                             10 Mar 1924 - 23 Mar 1924

Hungary                            22 Oct 1587 -  1 Nov 1587

Italy                               5 Oct 1582 - 15 Oct 1582

Japan                              19 Dec 1918 -  1 Jan 1919

Latvia                             During German occupation 1915 to 1918

Lithuania                          1915

Luxemburg                          15 Dec 1582 - 25 Dec 1582

Netherlands                        Catholic:    various 1582 or 1583
                                   Protestant:  various 1700 or 1701

Norway                             Then under Danish rule. See Denmark

Poland                              5 Oct 1582 - 15 Oct 1582

Portugal                            5 Oct 1582 - 15 Oct 1582

Romania                             1 Apr 1919 - 14 Apr 1919

Spain                               5 Oct 1582 - 15 Oct 1882

Sweden (including Finland)         18 Feb 1753 - 1 Mar 1753

Switzerland                        Varied with the Cantons. Generally one of
                                       12 Jan 1584 - 22 Jan 1584
                                        1 Jan 1701 - 12 Jan 1701

Turkey                             19 Dec 1926 -  1 Jan 1927

Yugoslavia (as it then was)        1919

UK                                 See Great Britain

USA (then American colonies)       See Great Britain

USSR (as it then was)               1 Feb 1918 - 14 Feb 1918
-- 
[reposted by]
Mark Brader, SoftQuad Inc., Toronto, utzoo!sq!msb, msb@sq.com
	Until 3,000 million years ago we can say not a lot happened
	although further study would not come amiss.  Then signs of life
	appeared, including some large reptiles and, very recently, bipeds.
	It is too soon to say whether these bipeds will play an important
	part in the world's story.    -- Colin Morris in "History Today"


From uchinews!ncar!elroy.jpl.nasa.gov!usc!cs.utexas.edu!uunet!pipex!uknet!zaphod.axion.bt.co.uk!srd!ghbr Thu Dec  2 17:13:36 CST 1993
Article: 53581 of alt.folklore.computers
Xref: uchinews alt.folklore.urban:101837 alt.folklore.computers:53581 sci.skeptic:54526 soc.culture.iranian:32021
Newsgroups: alt.folklore.urban,alt.folklore.computers,sci.skeptic,soc.culture.iranian
Path: uchinews!ncar!elroy.jpl.nasa.gov!usc!cs.utexas.edu!uunet!pipex!uknet!zaphod.axion.bt.co.uk!srd!ghbr
From: ghbr@fmg.bt.co.uk (Hossein Bagherzadeh Rafsanjani)
Subject: Re: Iranian calendar (was Re: Computer problems with 1999->2000 date)
Message-ID: <1993Dec2.154659.7970@srd.bt.co.uk>
Followup-To: alt.folklore.urban,alt.folklore.computers,sci.skeptic,soc.culture.iranian
Sender: root@srd.bt.co.uk (The Lord High Everything)
Reply-To: ghbr@fmg.bt.co.uk
Organization: BT
X-Newsreader: TIN [version 1.2 PL0]
References: <dasherCGAwwp.G0v@netcom.com> <CGB9pM.FvE@world.std.com> <1993Nov12.071108.7709@linkoping.trab.se> <CGEo5E.354@cwi.nl> <1993Nov15.212821.18523@mks.com>
Date: Thu, 2 Dec 93 15:46:59 GMT
Lines: 185
Status: R

Rich Wales (richw@mks.com) wrote:
: Dik Winter posted some info about the Persian/Iranian calendar, includ-
: ing the following:

: 	In 1920 a new calendar was introduced in Persia . . . .
: 	Leap years are as with the Gregorian calendar.

: My understanding was that the Iranian calendar uses a slightly different
: leap year cycle from that of the Gregorian (western) calendar, in which
: there are 8 leap years in every 33-year period.  That is, leap years are
: normally four years apart -- but once every 33 years an extra non-leap
: year is inserted, causing a pair of leap years to fall five years apart.

: This system gives an average year of 365.2424 days -- slightly closer to
: the current true value (365.2422) than our (Gregorian) 365.2425.

: I don't know offhand when the last "extra" non-leap year was, but I have
: a book at home (grammar text of the Persian language) which discusses
: the calendar and has this info.  Or maybe someone on soc.culture.iranian
: can help us out.

I reprint an article posted early in 1992 on SCI on the subject.  I
must add that the initial motivation for this reasearch was a note by
Rich on this subject appeared much earlier on SCI.

-hossein

----------------------------------------------------------------------------

(The article is written in LaTeX.  If you don't have this facility, simply
remove all words with a "\" in front of them, and may be some of the "{}"
symbols and/or the texts inside them.)

-hossein
-----------------------------------cut here--------------------------------
\documentstyle{article} 
\begin{document} 
\begin{center}
{\Huge The Great Leap Years Gap}
\end{center}
\begin{center}
{\large Dr. Hossein Bagherzadeh Rafsanjani\\ BT Labs, UK.}
\end{center}
\begin{center}
February 1992
\end{center} 
\vspace{.35in}
{\Large We have all being used to see the Iranian and Western leap years
coincide.  However, this year is going to be the last we experience this!
Read on ...}

\vspace{.2in}

The new western (Gregorian\footnote{Named after Pope Gregory XIII who
introduced the latest changes in the calendar in 1582.}) leap year of 1992 has
already begun and the Iranian (Jalaali\footnote{Named after {\it Jalaal-ol-Din
Malek-shaah-e Saljuqi} by {\em Omar Khayyam} who re-worked it in late fifth
century {\em hejri}.}) leap year of 1370 is ending.  This means that the month
of February will have 29 days and Esfand (the last month of the persian
calendar) 30 days, with a small variation in correspondence between the two
calendars for the 20 days in between. On 21st of March, the Iranian new year,
the relation between the two calendars will revert to normal with no
discrepancies in the dates.

There is of course nothing new in that.  We are all used to both the Jalaali
and Gregorian calendars.  These are both solar and have the same length of 365
days in normal years and 366 days in leap years. 
 The leap years come usually once every four years.  And for all we can
remember, the leap years in the two calendars have come so close to each other
that the distance between the two extra (leap) days in the two calendars have
been less than three weeks (from the end of February to the end of Esfand =
20th March).

This close correspondence between the two calendars has reduced the problem of
converting one calendar to the other to the very minimum.  Indeed, apart from
the last 20 days of the Jalaali leap years, one could usually use any calendar
of any year to find the corresponding dates between the two systems.  And for
those particular dates in the leap years, the Gregorian calendar is just one
day behind the Jalaali one, when compared to other years.  (For instance, 8th
of March, the International Women's Day, corresponds to 18th of Esfand in the
leap years and to the 17th of Esfand in other years.)

However, this cozy relationship between the two calendars is going to end for
the time being, i.e., at least for 99 years (unless the calendar system
changes)!  Why?  Because while there will be a three--year gap to the next
Gregorian leap year of 1996, we need to wait an extra year to the next Jalaali
leap year.  The next Jalaali leap year is not going to be in 1374 (as may have
been expected) but 1375.  And the next time the two leap years correspond to
each other as they do now, will be in the Gregorian year of 2096 and Jalaali
year of 1474.

The reason is both complicated and fascinating.  But before going into that,
let us have a look at the Jalaali calendar and appreciate some of its unique
features.

The Jalaali calendar is more ``natural'' than the Gregorian calendar.  It
starts with the natural cycle of the year, the first day of spring (for the
northern hemisphere).  As such, it has no national, regional or religious
significance.\footnote{The years' count is based on a historical religious
event ({\em hejrat}).  But that's a different story.  Gregorian calendar is
based on religion for both its base date and start of the year.} It is truly
universal.  Every season is associated with three full months of the year.  So
no confusion arises as which day of the year, e.g., the beginning of a season
is.  The first six months all have 31 days and the second six months all have
30 days in leap years, with the last month having 29 days in non-leap years.

Compare these with the Gregorian calendar.  There you will find no easy
correspondence between months and seasons' starts and endings, nor between the
natural and calendar years.  The months have arbitrary length of seven 31 days,
four 30 days and one 28/29 days interleaved irregularly.  It took only a Roman
dictator like Augustus to increase the days of the month of August by one day
just because July, the previous month (named after his predecessor Julius
Caesar), had 31 days in it.  Luckily, for Iranians, in spite of being ruled by
stream of dictators who occasionally fancied playing with calendars (the last
one done by the Shah who tried to add some 1180 years to the base date!), the
Jalaali calendar has remained almost intact.

Add to the above features, the fact that the Jalaali year follows closely the
movement of the earth (round the sun).  A natural solar year is neither 365
days nor 366.  It is something like 365 days, 5 hours and 49 minutes.  While
for westerners, the new year begins at midnight, for us there is an exact time
(to the seconds) worked out by astronomy which specifies the beginning of the
new year.  This is known as ``{\em tahvil-e saal}\; ''\footnote{A solar
calendar year begins at the point when the sun appears to cross the equator
from the southern hemisphere to the northern hemisphere as viewed from the
center of the earth.}.  However, for the calendar purposes, a day (of 24 hours)
can either belong to the past year (say, the last day of Esfand) or the new
year (1st of Farvardin).  So what we do is this: if the exact moment of {\em
tahvil-e saal} is before midday (Tehran time), we regard the same day as the
New Year's Day (1st Farvardin).  Otherwise, the New Year begins in the
following day.  This has made the Jalaali calendar year much more accurate than
the Gregorian one (details later).

Now, because the natural year is approximately 365 days and 6 hours, it means
that {\em approximately} every four years we have an extra day in the year -
hence the leap years.  But the year's length is about 11 minutes shorter than
that.  So, over the years, these 11 minutes added together affect the cycle of
the leap years.  For instance, while this year {\em tahvil-e saal} occurs just
after midday (Tehran time), and so the following day will be {\em Nowruz}, in
four years time it will happen before midday, and so the same day will be
regarded as {\em Nowruz} and not the following day.  As a result, the leap year
is pushed to the next year.  This happens every 33 years, when the differences
of 11 minutes add up to approximately 360 minutes - equal to 6 hours.  That is
enough to cause an extra non-leap year every 33 years.

And that is how the Jalaali calendar system is organized: In this calendar 8
years out of 33 are leap years.  The leap years are those with a remainder
(after dividing by 33) of 1, 5, 9, 13, 17, 22, 26, and 30.  For instance, 1370,
the current year, divided by 33 leaves 17 as the remainder, and so is a leap
year.  Moreover, the above figures show that there will be a five-year span
(instead of the usual four years) between this leap year and the next.  The
last time the same thing happened was between the leap years of 1337 and 1342
(Gregorian years 1958-59 and 1963-64, respectively). 

And how does the Gregorian calender deal with these anomalies?  Here too, they
have made things much simpler for themselves and not bothered about the natural
year.  They have fixed the leap years for every four years except for the years
which are divisible by 100 but not by 400!  So, the year 2000 will be a leap
year (as it is divisible by 400) but not, say, 2100.  In this way, they have
managed to compensate for the shortfall of 11 minutes per year over a span of
400 years.  A clever way but not consistent with the actual size of a natural
year.  Moreover, the system is not accurate over a longer period of time, but
who cares?

The only problem is for us who have to deal with the two systems, and convert
the days from one to another.  The effect of these variations in the leap years
is that, when converting the dates, there may be one or two days difference
between the corresponding days from one year to another.

In view of this fact, it may be worthwhile to look back at the years before
1339.  If you happen to have a date in the years before 1339 (before March
1960, to be exact) converted into the Gregorian calendar, say your date of
birth in the passport, it is very likely that the conversion is {\em wrong}.
But it may also be the case even for the dates between the 10th to 30th of
Esfand in every leap years, anyway.  Passport issuing officers, past and
present, have no time for such niceties as these calculations require, and
usually use a current calendar for converting dates to each other.  The
question is: does it {\em really} matter, anyway?  Not for the bulk of Iranians
who never care(d) about their birthdays.  But over here, if you have taken an
insurance on your life, the insurance company may be interested to check your
{\em exact} date of birth if the insurance happens to mature on a date on the
borderline.  Enough to give some sleepless nights to many!
\end{document}




From hnsngr@sirius.com Fri Jun 16 12:40:01 CDT 1995
Article: 105222 of alt.folklore.computers
Xref: uchinews alt.folklore.computers:105222
Path: uchinews!vixen.cso.uiuc.edu!howland.reston.ans.net!news.sprintlink.net!uunet!in1.uu.net!sun.sirius.com!slip147.sirius.com!user
From: hnsngr@sirius.com (Ron Hunsinger)
Newsgroups: alt.folklore.computers
Subject: Re: Is 2000 a leap year
Date: Fri, 16 Jun 1995 01:31:05 -0700
Organization: ErsteSoft
Lines: 48
Distribution: world
Message-ID: <hnsngr-1606950131050001@slip147.sirius.com>
References: <95061418365617615@nwcs.org>
NNTP-Posting-Host: slip147.sirius.com
Status: R

In article <95061418365617615@nwcs.org>, paul.rogers@nwcs.org (Paul
Rogers) wrote:

> I heard only once in passing that there is a similar correction for 4,000
> year intervals but have never been able to confirm it.  Anybody know?

The way I heard it (when I was very young) was that Russia had actually
officially adopted it. (Except that I remembered it being 40,000 years.)
My father, whose politics were more than a little left of center in those 
days, touted this as an example of the forward thinking inspired by 
communism, or typical of communists, I could never tell which.

It seemed to me like the rest of the world had plenty of time to discuss
the issue, and it was rash to rush to judgement. Still do. The beginning
of the 40th century will be plenty soon enough to worry about it.

Although, if the error in our current system really is the difference
between 365.2425 days per year (which we do now) vs 365.2422 days per year
(which nature does), it looks like we need to subtract 3 days per 10000
years. We could come close by making multiples of 3200 not be leap years.
(They normally would be, since they're divisible by 400.) That means we
only have about 1200 years to make up our minds.

I was going to say that it probably won't come to that anyway. Astronomers
frequently add a leap-second without much commotion. They notice the drift,
decide among themselves when to make the adjustment, and do it. Nobody else
even notices that their clocks are off by another second (or a second 
closer to the right time).

(Many electical clocks don't even notice that, because many power companies
temporarily adjust the 60Hz line frequency to drop or add 60 cycles over
the next day.)

So, I was going to say that a few well-placed leap seconds spread out over
a few centuries could add up to the necessary leap day, and we wouldn't 
have to worry about it.

But then I realized that leap seconds are added to compensate for 
fluctuations in the length of a day, whereas leap days are added to
compensate for a discrepancy in the length of the year. Two quite different
things. If you added enough leap seconds to make up a whole day, then
somewhere in the middle you would have the sun high in the sky at 
midnight, and I think someone would notice.

So I guess we do have to do something after all. Shall we meet here again 
in 1200 years to discuss it?

-Ron Hunsinger


From dik@cwi.nl Thu Aug 24 17:44:48 CDT 1995
Article: 112366 of alt.folklore.computers
Xref: uchinews alt.folklore.computers:112366
Newsgroups: alt.folklore.computers
Path: uchinews!vixen.cso.uiuc.edu!news.uoregon.edu!tank.news.pipex.net!pipex!news.sprintlink.net!in1.uu.net!EU.net!sun4nl!cwi.nl!dik
From: dik@cwi.nl (Dik T. Winter)
Subject: Re: Is the year 2000 a leapyear?
Message-ID: <DDu1o9.82B@cwi.nl>
Sender: news@cwi.nl (The Daily Dross)
Nntp-Posting-Host: bever.cwi.nl
Organization: CWI, Amsterdam
References: <DDrqqy.Luv@csc.liv.ac.uk> <41gtco$psm@lucas.emi.com> <DDtpxG.HAo@midway.uchicago.edu>
Date: Thu, 24 Aug 1995 20:45:44 GMT
Lines: 19
Status: R

In article <DDtpxG.HAo@midway.uchicago.edu> enf1@midway.uchicago.edu writes:
 > I should know better than to get involved in a thread about the
 > history of calendars, but --

Yes, indeed.

 > He also mentions the transitions in several other countries.
 > Particularly interesting was, I believe, Sweden (I don't have
 > the book in front of me) which simply stopped having leap years
 > until the calendar was synchronized with Gregorian, which must
 > have been a much less traumatic way to switch calendars.

This is a legend but not true.  It was possibly the intention, so
they dropped the 29th of February in 1700, but they did not in 1704
and 1708 and to compensate they added a 30th of February in 1712.
The Gregorian calendar was adopted in 1753.
-- 
dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland, +31205924098
home: bovenover 215, 1025 jn  amsterdam, nederland; e-mail: dik@cwi.nl


From enf1@midway.uchicago.edu Thu Aug 24 11:41:11 CDT 1995
Article: 112317 of alt.folklore.computers
Xref: uchinews alt.folklore.computers:112317
Newsgroups: alt.folklore.computers
Path: uchinews!ellis!enf1
From: enf1@ellis.uchicago.edu (Eric Fischer)
Subject: Re: Is the year 2000 a leapyear?
X-Nntp-Posting-Host: midway.uchicago.edu
Message-ID: <DDtpxG.HAo@midway.uchicago.edu>
Sender: news@midway.uchicago.edu (News Administrator)
Reply-To: enf1@midway.uchicago.edu
Organization: The University of Chicago
References: <19950818.130419.869@genie.com> <DDM2JG.EnM@polo.demon.co.uk> <DDrqqy.Luv@csc.liv.ac.uk> <41gtco$psm@lucas.emi.com>
Date: Thu, 24 Aug 1995 16:32:04 GMT
Status: RO

phaedrus@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN () writes,
>: > >and its colonies, for example, used March 25 and the Julian reckoning 
>: > >until 1752. Thus, George Washington was officially born on Feb. 11, 
>: > >1731, Old Style (O.S.);  this is Feb. 22, 1732, Gregorian, or New Style 
>: > >(N.S.).
>: > 
>: > Must have been a lot more than 11 days chopped out of the calendar
>: > in the colonies then.
>
>You see, Britain "officially" celebrated the new year near the
>end of March before the switch to Gregorian.  So for instance,
>two months after 11 Feb 1731 would be 11 April 1732.
>
>When they switched to Gregorian, they changed the official date
>of New Years to 1 Jan, meaning that in Britain, officially, 1752
>began 25 March, lost 11 days in September, and ended 31 December!

I should know better than to get involved in a thread about the
history of calendars, but --

Acccording to the _Handy-Book of Rules and Tables for Verifying
Dates with the Christian Era_ (London: George Bell & Sons, 1889)
by John J. Bond, Assistant Keeper in Her Majesty's Record Office,
"the day after 31 December, 1751 was called 1 January, 1752," so
1752 did *not* begin 25 March.

He also includes a more complete history of the calendar in England:

   ????-1065   years begin 25 March
        1066   25 March - 31 December
   1067-1155   1 January - 31 December
   1155-1750-1 25 March - 24 March
        1751   25 March - 31 December
        1752   1 January - 31 December (with days missing)

I must admit that I'm somewhat confused by the above account,
because it has 1155 rendered both from 1 Jan - 31 Dec and from 25
Mar - 24 Mar (which I take to mean that it began 1 Jan, continued
through 31 Dec, and kept continuing until 24 Mar, which would be
followed by 25 Mar 1156) and says that the 25 Mar - 24 Mar system
continued until "1750-1" which I assume means that 1750 was the
last year to end on 24 Mar but 1751 continued starting on 25 Mar.

He also mentions the transitions in several other countries.
Particularly interesting was, I believe, Sweden (I don't have
the book in front of me) which simply stopped having leap years
until the calendar was synchronized with Gregorian, which must
have been a much less traumatic way to switch calendars.

Eric
enf1@ellis.uchicago.edu


From guy@netapp.com Thu Feb 22 14:16:04 CST 1996
Article: 133860 of alt.folklore.computers
Xref: uchinews alt.folklore.computers:133860
Path: uchinews!condor.acc.iit.edu!chi-news.cic.net!nntp.coast.net!howland.reston.ans.net!nntp.crl.com!pacbell.com!amdahl.com!news.fujitsu.com!nntp-sc.barrnet.net!netapp.com!netapp.com!not-for-mail
From: guy@netapp.com (Guy Harris)
Newsgroups: alt.folklore.computers
Subject: Re: History of TZ
Date: 21 Feb 1996 14:01:58 -0800
Organization: Network Appliance
Lines: 122
Message-ID: <4gg4om$bi5@bayonne.netapp.com>
References: <4gae0l$end@dove.nist.gov> <4ge8s1$2d6@windigo.d-and-d.com>
NNTP-Posting-Host: 192.9.200.18
Status: R

David Flater <dave@case50.ncsl.nist.gov> wrote:
>3.  TZ = ":US/Eastern"  BSD machines always seem to have a zoneinfo
>    database that you can access like this.
>
>What I'd like to know is where and when did systems #1 and #3
>originate?  Is it really a SYSV vs. BSD thing?  There was an
>implementation of zoneinfo posted to comp.sources a long time ago, and
>it's not clear to me whether it originated there or in the BSD
>sources.  Any relevant or marginally relevant anecdotes (or even hard
>facts!) would be appreciated.

Hard facts you want, hard facts you get.

Unfortunately, the original posting either hasn't gotten here yet, or
got here ages ago, expired, and the followup whence I extracted the
above only got here recently, so I don't know what 1) and 2) are; I'll
have to guess.

A history of UNIX time zone handling:

"V6" UNIX had, compiled into its library routines ("ctime.c", I think):

	1) the offset from UTC of the current time zone;

	2) whether "summer time"/DST is observed;

	3) if it is, the rules for switching to and from DST.

This meant that you had to recompile the C library, and all binaries
linked with it (V6 supported only static linking), to change the time
zone *or* the rules (e.g., if you're not in some place with the US
rules, or if you are but the government changes the rules).

"V7" UNIX put into the kernel a couple of variables to store the offset
from UTC of the current time zone, and whether "summer time" is
observed; the "ftime()" call fetched that information, as well as the
time of day plus a millisecond-resolution add-on.  That way, you could
reconfigure your kernel, and change the time zone offset or change
whether DST was observed or not, as user-mode code would just call
"ftime()" to get the information it needed.  The rules, however, were still
compiled into "ctime.c", so if they changed, or if your locale's rules
weren't among those compiled in, you needed to change "ctime.c",
recompile the C library, and relink all programs.  I forget whether the
"timezone()" routine was also in V7, for returning the name of the time
zone, or whether that was added by some BSD release; in either case,
that's one *more* thing compiled into C library routines.

4.2BSD added "gettimeofday()", which was "ftime()"-like, but had a
microsecond-resolution add-on to the time of day, and, instead of
returning a Boolean "DST or not" flag, returned a small integer
selecting one of a set of N rules for Daylight Savings Time; one of the
members of that set was "no DST".  The rules, however, were still
compiled into "ctime.c", so if they changed, or if your locale's rules
weren't among those compiled in, you needed to change "ctime.c",
recompile the C library, and relink all programs.

Meanwhile, some flavor of non-Research AT&T UNIX added the TZ
environment variable, which provided a solution similar to Research
UNIX's "ftime()", except that the information was stored in an
environment variable rather than in the kernel, and that the time zone
name was also in the environment variable.  The rules were still stored
in "ctime.c", though, requiring a recompile and relink to change them.

Which brings us to...

DoN. Nichols <dnichols@d-and-d.com> wrote:
>	Well ... I can't say for sure where it originated, but the zoneinfo
>based libs were posted at about the time that congress, in their infinite
>wisdom, screwed up the algorithm for DST on/off shifts which was hardcoded
>into the earlier systems (from my old v7 system that I was running at the
>time, through the 1985 version of SysVr2 which came for the AT&T Unix-PC
>(7300/3B1), all the way through version 3.51 (the last to ship.)

...the US government deciding to change the rules for Daylight Savings
Time once again.  (This time, it was allegedly at the behest of Clorox,
makers of Kingsford charcoal briquets, who wanted DST to start earlier
so that it would be in effect for a longer time, encouraging people to
start barbecuing earlier and buying more Kingsford charcoal briquets.)

A discussion in "mod.std.unix" (yes, kids, there *was* a newsgroup with
that name, back then) ensued, with various people talking about having
the time zone information fetched from a file, which would obviate the
need to change "ctime.c", recompile the library, and relink all programs
to deal with rule changes - *and* to deal with locales that don't have
the US rules, i.e. most locales (i.e., removing a UScentrism that was
probably a source of considerable annoyance to UNIX users outside the
US).

Arthur Olson, at the US National Institutes of Health National Cancer
Institute, ended up coming up with the "zoneinfo" scheme, and made
available a first cut at the code.  A bunch of other people got that
code and worked more on it; the original version of the "tz" mailing
list, according to Arthur, was:

        ado@elsie.UUCP (Arthur Olson)
        chris@umcp-cs.UUCP (Chris Torek)
        mark@cbosgd.ATT.COM (Mark Horton)
        kre@munnari.OZ (Robert Elz)
        dlm@cuuxb.ATT.COM (I should remember his name, but don't)
        devine@vianet.UUCP (Bob Devine)
        bob@anvil.UUCP (Another one I don't remember, sorry)
        rgt@hpfcdg.UUCP (Another one I don't remember, sorry)
        guy@sun.UUCP (yours truly)

who were the original folks expressing an interest in the code, and
adding stuff to it.

Meanwhile, the System V folk at AT&T extended the TZ environment
variable to include the current year's DST-on and DST-off rules, and to
support a DST offset other than a one-hour offset.n

HP had either already done their *own* time-zone file scheme, or did so
when the charcoal briquets hit the fan.

Some UNIXes picked up the Olson code; I added it to SunOS 4.0, for
example.  BSD ended up picking it up as well, but it didn't originate
with BSD, it originated with Arthur Olson.

Eventually, while at Sun and involved with the discussions with AT&T
about System V Release 4, I got AT&T to pick up the Olson code for SVR4,
although I'm not sure whether SVR4.0 from AT&T supplied the Olson data
files.  SVR4.2, I think, uses the Olson scheme as the default scheme.


From shoppa@schedir.krl.caltech.edu Sun Mar  3 01:15:59 CST 1996
Article: 134821 of alt.folklore.computers
Xref: uchinews alt.folklore.computers:134821
Path: uchinews!news.luc.edu!chi-news.cic.net!nntp.coast.net!howland.reston.ans.net!vixen.cso.uiuc.edu!newsfeed.internetmci.com!sgigate.sgi.com!enews.sgi.com!decwrl!lll-winken.llnl.gov!fnnews.fnal.gov!nntp-server.caltech.edu!schedir.krl.caltech.edu!shoppa
From: shoppa@schedir.krl.caltech.edu (Tim Shoppa)
Newsgroups: alt.folklore.computers
Subject: Re: Ad year 2000 nonsense?
Date: 1 Mar 1996 22:59:35 GMT
Organization: Kellogg Radiation Lab, Caltech
Lines: 61
Message-ID: <4h7vgn$sfr@gap.cco.caltech.edu>
References: <73.54718.1318@toadhall.com> <4g4kak$d5o@inca01.inca.co.nz> <00002d76+00005f65@msn.com> <4gtc8b$1e8@news.cablenet.net>
NNTP-Posting-Host: schedir.krl.caltech.edu
Status: R

In article <4gtc8b$1e8@news.cablenet.net>,
David Cantrell <david@uaug.cablenet.co.uk> wrote:
>In article <00002d76+00005f65@msn.com>,
>	dvm@msn.com (David Mills) enlightened us thusly:
>
>>The one I've always liked is VMS, it runs out of time in 31816 (63 
>>bits worth of 10 nanoseconds since 17-Sep-1858)...  There already is 
>>a bug-report raised noting that the standard date display format 
>>(DD-MMM-YYYY) will have to be fixed sometime before the year 9999 
>>ends :-)
>
>Why 63 bits, why 17-Sep-1858, and why 10 ns???
>
>-- David Cantrell, parttime HTML/VB/Forth techie
>                   fulltime chef, homebrewer, musician, squash player
>

The statement below from DEC explains the date and 63 bits, and
I think the actual granularity is 100 ns, not 10 ns.  I would hazard
a guess that the reason for the 100 ns time granularity is because
it is fine enough to do instruction timing on a 1-MIPS class
machine like a 11/780.

Tim. (shoppa@altair.krl.caltech.edu)

COMPONENT:  SYSTEM TIME                  OP/SYS:     VMS, Version 4.n

LAST TECHNICAL REVIEW:  06-APR-1988

SOURCE:   Customer Support Center/Colorado Springs

QUESTION: Why is Wednesday, November 17, 1858 the base time for VAX/VMS?

ANSWER:   November 17, 1858 is the base of the Modified Julian Day system.

The Modified Julian Day was adopted by the Smithsonian Astrophysical Obser-
vatory (SAO) in 1957 for satellite tracking.

Eighteen bits would allow the Modified Julian Day (the SAO day) to grow as
large as 262,143 ((2 ** 18) - 1).  From Nov.  17, 1858, this allowed for
seven centuries.  Using only 17 bits, the date could possibly grow only as
large as 131,071, but this still covers 3 centuries, as well as leaving the
possibility of representing negative time.  The year 1858 preceded the
oldest star catalog in use at SAO, which also avoided having to use negative
time in any of the satellite tracking calculations.

This base time of Nov.  17, 1858 has since been used by TOPS-10, TOPS-20,
and VAX/VMS.  Given this base date, the 100 nanosecond granularity
implemented within VAX/VMS, and the 63-bit absolute time representation (the
sign bit must be clear), VMS should have no trouble with time until:

   31-JUL-31086 02:48:05.47

At this time, all clocks and time-keeping operations within VMS will
suddenly stop, as system time values go negative.

Note that all time display and manipulation routines within VMS allow
for only 4 digits within the 'YEAR' field.  We expect this to be corrected
in a future release of VAX/VMS sometime prior to 31-DEC-9999.





