The original Julian Calendar was introduced by Julius Caesar (thus the
name) in 44 B.C. The length of a single year was to be equal to the
time time it takes for the earth to orbit the sun once. This amount
was estimated to be 365 days and 6 hours. Every fourth year the extra
six hours were collected and added as an extra day to the year,
creating a leap year of 366 days.
0.5.5.1 A Brief History of the Julian Calendar
Because of a slight inaccuracy in estimation of a year's length under
the original Julian Calendar (The true amount of time it takes for the
Earth to complete one solar orbit is closer to 365 days, 5 hours, 49
minutes and 12 seconds), over a long period of time the extra minutes
and seconds began to accumulate and things began to go wrong. Most
notably the Spring Equinox, which occurs at a measurable fixed point
in the Earth's orbit, began not to fall on the same date.
The ``new style'' Julian Calendar, upon which the algorithm presented
here is based, dates from the year 1582. That is when Pope Gergory
XIII decided to fix the messed up Julian calendar. To do so he
skipped the date forward from October 5th to October 14th to trim time
added due to the inaccuracy of the Julian calendar. He also redefined
which years would be counter as leap years. Before, every year evenly
divisible by four was leap; Pope Gregory changed the rules so that:
All years evenly divisible by four were leap years except those
evenly divisible by 100 and not also evenly divisible by 400.
For instance, 1700, 1800, and 1900 are not leap years. They are
evenly divisible by four but are also divisible by 100. The year 2000
is a leap year because it is evenly divisible by four and, even though
it is also divisible by 100, it is also divisible by 400. The
Gregorian calendar also set New Year's day to January first. The
``new style'' Julian Calendar is popularly called the Gregorian
Calendar in honor of Pope Gregory.
Interestingly, only Catholic countries used this better calendar right
away. Many Protestent countries, however, adopted it over the next
two centuries. Most did so around 1700. England held out until
1752. Others waited until the early 1900s. Some Greek Orthadox
countries opted to create their own calendar (a modified version of
the Gregorian system) and use it instead today.
The ``new style'' (Gregorian) calendar should accurately model the
Earth's movement around the sun for some 40,000 more years.
A mistake commonly made is to confuse ``Julian day numbers'' with the
``Julian calendar.'' The Julian calendar is the system implemented in
44 A.D. by Caesar. Julian day numbers (which are based on the
calendar and are calculated by the code in the following section) were
proposed by a monk and named ``Julian'' after his father (not Caesar).
Day numbers are simply the number of days elapsed since a fixed
starting date. That date is arbitrary but often set to January 1st,
4713 B.C. (which the monk thought was pretty darn close to when the
biblical creation story in Genesis must have taken place). Other
day numbering routines use different days as ``day zero.''