## Thursday, March 1, 2012

### Happy Leap Day!

Happy February 29th, everyone! As this is the first leap year since I started my blog I thought I would give a quick overview of the Gregorian calendar system that brings it about.

Any such discussion should begin, however, with the introduction of the Julian system which the Gregorian system replaced. The Julian calendar was a modification of the Roman calendar put in place by Julius Caesar, taking effect in 45 BC. It was an attempt to keep the calendar in sync with the seasons, which is necessitated by the fact that the Earth does not take an integer number of days to orbit the Sun. The sidereal year, the amount of time it takes for the Sun to return to the same apparent location in the sky relative to the background stars, is about 365.25636 days. While this is not too complicated, we also have to account for the fact that the direction of the Earth's rotational axis is not constant with time, but rather wobbles very, very, slowly like a top. This cycle takes a long time to complete $$-$$ about 24,000 years $$-$$ but it does produce noticeable results, such as the fact that the time between successive equinoxes or solstices (called a tropical or solar year) is about 365.24237 days $$-$$ about 20 minutes shorter than a sidereal year. It's also more important for purposes of agriculture, because the seasons are tied to the solar year rather than the sidereal year.

Anyway, because the year is not an integer number of days, any attempt to use an integer number of days in a calendar will lead to a slow drifting of seasons. Given enough time (and at $$\sim{}$$1 day every 4 years, it wouldn't take too much time) the seasons would drift slowly backwards through the year. Spring, summer, fall, and winter would all begin earlier and earlier. While this might not sound too bad in theory, it can play havoc if you're a farmer wanting to use the calendar to know when you should be planting or harvesting your crops $$-$$ and in a pre-industrial society, that could mean the difference between surviving through the winter or starving to death.

Prior to Julius Caesar the Romans tried to fix this situation by the random inclusion of extra (intercalary) months. And I do mean random, the Roman officials in charge for the year were in charge of determining if they needed an extra month, and since these officials served for "a year", there could be quite the temptation to increase the length of one's rule or deny a rival extra time in office. Julius Caesar decided to come up with a system that would be independent and self-correcting after a stint in Egypt, where a system of adding 1 day every 4 years had been proposed, but not carried through. His mathematical advisors came up with the same idea, and in 46 BC he mandated the adoption of the Julian calendar.

Now, the Julian calendar was quite the improvement over the previous chaos, to be sure. It was good enough, in fact, that some countries continued to use it up into the 20th century. It kept the dates of equinoxes and seasons much better than any previous attempts, and only gained 1 day every 128 years. Given the length the Roman empire lasted after the adoption of the calendar, the few days gained weren't that big a deal. However, by the Middle Ages, the seasons were definitely out of sync. By AD 1582 the equinoxes were happening about 10 days earlier than they should (March 11 instead of March 21). Pope Gregory XIII decided to fix this state of affairs, and asked the finest mathematical minds in Europe to come up with a better system, which eventually came to bear his name.

The difference between the Julian and Gregorian system isn't very big. Under the Julian system, the calendar gains about 3 days every 400 years, i.e., in 400 years there are 100 leap days in the Julian system. The Gregorian system fixes this by taking away 3 of those leap days, for a total of 97 leap days ever 400 years. The way this was accomplished was by decreeing that years ending in 00 would not be leap years (like they ordinarily would) unless they were also divisible by 400. So the 2000 was actually rather special: it wouldn't be a leap year except for the fact that it is divisible by 400. Likewise, the year 2100 will not be a leap year, even though it is halfway between two leap years.

Such a simple, tiny change, yet what a big difference it makes! In the Julian system, over a period of 4 centuries there are $100\times366+300\times365=146,100\,\text{days}$ while in the Gregorian system there are $97\times366+303\times365=146,097\,\text{days}$
That doesn't seem like a big difference, yet the Julian system is accurate to 1 day every 128 years, while the Gregorian system is accurate to 1 day every 7,700 years, over 60 times as accurate. Pretty neat, huh? Happy Leap Day!