Is/was 1400 a leap year?

David N. Smith (IBM) dnsmith at watson.ibm.com
Wed May 16 14:45:43 UTC 2001


A year is a leap year if:

	* It is divisible by four,
	* but it is not divisible by 100.
	* Except years divisible by 400 are leap years anyway.

The year 1400 is divisible by 4, making it a possible leap year, but
1400 is divisible by 100 but not by 400 making it not a leap year.


The book Calendrical Calculations defines a leap year (converted from Lisp to Smalltalk) as:

	year := 1604.
	(year \\ 4 = 0) and: [
		(#(100 200 300) includes: year \\ 400) not]

which is equivalent.


However note that this is the definition in the Gregorian calendar, instituted by Pope Gregory in about 1600 but not adopted in some countries for centuries. Prior to that the Julian calendar was used, and it defined a leap year as:

	* It is divisible by four,
	* But not divisible by 100.

Since the year 1400 predates the Gregorian calendar, one should wonder if it means anything to ask if it is a leap year under the Gregorian calendar. While the answer for 1400 is the same, it is not true for, say, 1200.


BTW, there is a new edition of Calendrical Calculations due out Real Soon Now (maybe August?) titled Calendrical Calculations: The Millennial Edition. The first edition was wonderful and the new one adds a lot of new material. The first edition covered 14 calendars, including computation of special holidays (like Easter), and it contained the code in Lisp.

Dave

At 10:54 +0100 5/16/01, John Hinsley wrote:
>I suspect we're into calendars (Gregorian vs. Julian) here, but....
>
>If I do cal 1400
>
>I get a February with 29 days that is, a leap year.
>
>If I squeak "Transcript show: (Date leapYear: 1400)" I get 0. (That is,
>not a leap year).
>
>And 1400 is exactly divisible by 4.
>
>(Incidentally, both "know" that year 0 is illegal.)
>
>It's hardly the end of the world, but does anyone have the "right"
>answer?
>
>Cheers
>
>John
>--
>******************************************************************************
>Marx: "Why do Anarchists only drink herbal tea?"
>Proudhon: "Because all proper tea is theft."
>******************************************************************************


-- 
_______________________________
David N. Smith
IBM T J Watson Research Center
Hawthorne, NY
dnsmith at watson.ibm.com





More information about the Squeak-dev mailing list