The Perpetual Calendar

Back to Contents

Back to Earth's Orbit

In essence, a perpetual calendar comprises an algorithm that associates a day of the week with any given date on the Gregorian calendar. Usually, when we consult a perpetual calendar, we find the calendar manifested in a set of charts: the first chart correlates the target year with a letter code; the next chart converts that letter code into a second letter code for the target month in the target year; and the next chart or charts display the seven possible arrangements of the days of the week over the conventional 31-day calendrical display, from which, using that second letter code to select the correct pattern of days, we read off the day of the week that corresponds to our target date.

I don't want to use charts. Because the Gregorian calendar follows simple rules, I want to calculate the day of the week on which my target date falls by using modular arithmetic. Specifically, I want to start with a known date (AD2000 Jan 01, which fell on a Saturday) and use addition and subtraction Modulus-7 to calculate a number that corresponds to the day of the week on which the target date falls.

Arithmetic Mod7 uses only the numbers zero through seven in a cyclic manner, just as clocks use arithmetic Mod12. We must, therefore, convert all other numbers by dividing them by seven, discarding the quotients, and keeping the remainders; thus, for example, 38 Mod7 = 3. To make the days of the week susceptible to that kind of calculation, we must assign numerical values to them. So we set Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = 4, Thursday = 5, Friday = 6, and Saturday = 7 or 0. Thus our anchor day, AD2000 Jan 01, has the value 0, which we use to begin a running sum in calculating the day of the week of our target date.

Next we note that the length of the standard year Mod7 equals one day; that is, the year consists of fifty-two seven-day weeks plus one day. So from one standard year to the next a given date falls one day later in the week. Richard P. Feynman, one of the physicists who worked out the theory of quantum electrodynamics, was born AD1918 May 11, which fell on a Saturday; his first birthday, AD1919 May 11, thus fell on a Sunday. Thus, to our running total we must add the number of full years between AD2000 Jan 01 and the January First of our target year: if our target date occurs in a year prior to AD2000, we must subtract the number of years from the running sum.

But the year spans more than 365 days. To keep the calendar correct we add a leap day at the end of February in any year evenly divisible by four except for those century years not evenly divisible by four hundred. Thus, between the births of Albert Einstein in March 1879 and Richard Feynman in May 1918 we have the quotient of 39 years divided by four = 9 leap days minus the non-leap day in AD1900 for 8 leap days total. In our running sum we would subtract the leap days between AD2000 and our target year if the target year occurred prior to AD2000. If our target year occurs after AD2000, then we add the leap days of our calculation plus one day to compensate the fact that our calculation does not count AD2000 as a leap year. We must also be careful when the target year itself is a leap year, not counting the year's leap day if our target date falls in January or February of that year.

Next we must add to our running sum (and always add) a number of days representing the whole months that come between January First of our target year and the first day of our target month. The following diagram shows the number of days in each month, the number of days Mod7, the cumulative number of days for the year, and the cumulative days Mod7. Note that I have not included the leap day in February, having accounted for it in the year count above.

Finally we add to our running sum the target day of the month (minus one because we have already accounted for the first day of the month in starting our count at Jan 01) and calculate the Mod7 of the total to get the number corresponding to the day of the week. Four examples should suffice to demonstrate how this works:

2. Add 159 days for the 159 years between AD2000 Jan 01 and AD2159 Jan 01: total = 159.

3. In those 159 years we have 39 calculated leap days plus one for AD2000 and minus one for the non-leap year of AD2100 for an increment of 39 leap days: total = 198.

4. For the span AD2159 Jan 01 to AD2159 May 01 add 1 day (from the diagram): total = 199.

5. Add the 17 days from May 01 to May 18: total = 216.

6. 216 days Mod7 = 6; therefore, AD2159 May 18 falls on a Friday.

This is Relativity Day, the official publication date of the issue of Annalen der Physik in which Einstein's "On the Electrodynamics of Moving Bodies" appeared.

2. Subtract 95 days for the 95 years between AD1905 Jan 01 and AD2000 Jan 01: total = -95.

3. Subtract 23 leap days: total = -118.

4. For the span AD1905 Jan 01 to AD1905 Sep 01 add 5 days: total = -113.

5. Add the 25 days between Sep 01 and Sep 26: total = -88.

6. -88 days Mod7 = -4. But -4 Mod7 = +3, so AD1905 Sep 26 fell on a Tuesday.

The birth date of Richard P. Feynman.

2. Subtract 82 days for the 82 years between AD1918 Jan 01 and AD2000 Jan 01: total = -82.

3. Subtract 20 leap days: total = -102.

4. For the span AD1918 Jan 01 to AD1918 May 01 add one day: total = -101.

5. Add the 10 days from May 01 to May 11: total = -91.

6. -91 days Mod7 = 0. Professor Feynman was born on a Saturday, as we saw above.

The birth date of Albert Einstein.

2. Subtract 121 days for the 121 years between AD1879 Jan 01 and AD2000 Jan 01: total = -121.

3. Subtract 30 leap days minus the non-leap day of AD1900 or 29 days: total =    -150.

4. For the whole months spanning AD1879 Jan 01 to AD1879 Mar 01 add 3 days: total = -147.

5. Add the 13 days between Mar 01 and Mar 14: total = -134.

6. -134 Mod7 = -1. But -1 Mod7 = +6, so Einstein was born on a Friday.

efefefaaabbbefefef

Back to Contents

Back to Earth's Orbit