Leap Year Checker.

D. Richard Hipp drh at duke.cs.duke.edu
Fri Sep 28 21:47:37 AEST 1990


>|> Ordinarily, a leap-year is a multiple of four, so that--given leap-year y--
>|> (y%4 == 0) ought to indicate if y designates a leap-year.
>|Every leap year is divisible by four, but not every year divisible by
>|four is a leap year.  Since the 18th century (I think 1752, but an
>|earlier century in R.C. countries), the algorithm has been...
>The date was 1582.

Pope Gregory the something-th instituted the Gregorian calendar beginning
on October 5, 1582.  Countries loyal to Rome followed suit immediately.
Other nations began to gradually convert to the Gregorian system over the
next 4 centuries.  The British Empire converted on September 2, 1752.
Russia waited until the 20th century before "going Gregorian".

You can probably guess that the non-uniformity of calendars in Europe in
prior centuries created some small confusion for international travelers.



More information about the Comp.lang.c mailing list