An increasingly important survival skill in the modern world is the ability to mentally calculate on which day of the week a particular date falls. Most of us have at some time been hospitalised, caused the death of loved ones or suffered the embarrassment of public nudity due to our inability to perform this simple task. But anyway, enough about me: let us consider how best for you to avoid a similar fate.

The technique described below is due to the famous mathematician John Horton Conway, who refers to it as the Doomsday algorithm. Conway delights in asking new acquaintances their birthdates and almost instantaneously telling them on which day of the week they were born; he claims (perhaps not unreasonably) to be the fastest human date-calculator in the world.

Firstly, a little memorisation is an essential investment for the budding Doomsday algorithmist. The heart of the technique is a list of what Conway calls "Doomsdays"--one date in each month--which conveniently all fall on the same day of the week each year. (For example, in 2000 each Doomsday was a Tuesday.) The dates are as follows:

January 31st (or 32nd in a leap year--this apparent absurdity is explained below)
February 28th (or 29th in a leap year)
March 0th (see below for explanation)
April 4th
May 9th
June 6th
July 11th
August 8th
September 5th
October 10th
November 7th
December 12th
Do not give up in disgust at this point. With a couple of tricks, this list is very easy to memorise. For example, note that for all the even months except February, the month number equals the day number: 4/4, 6/6, 8/8, 10/10, 12/12. As for May, July, September and November, Conway recommends using the mnemonic "I work from 9 to 5 at the 7-11" which yields the dates 9/5, 5/9, 7/11 and 11/7. Next, remember that the last day of February is always a Doomsday--whether or not this happens to be the 28th or 29th. Since this is one day before March 1st, we list it again as "March 0th", a somewhat redundant entry but a convenient mental device when calculating dates in March. A similar illegal date is given to the January Doomsday in leap-years: "January 32nd" obviously refers to the day after January 31st, even though this is not its proper name.

Having memorised this list, you're already able to calculate any date in 2000, since we know that Doomsday 2000 is Tuesday. For example, the 4th of July in 2000 is seven days before the Doomsday (Tuesday) July 11, and is therefore also a Tuesday. January 30th 2000 comes two days before a Doomsday (2000 was a leap year so "January 32nd" is a Doomsday) and is therefore a Sunday.

The remainder of the technique involves calculating the Doomsday for any given year. The procedure is very simple and with practice will take a matter of seconds:

First, what century are we talking about? For the 2000s, as we have seen, the first Doomsday of the century is a Tuesday. In 1900, it was a Wednesday. In practice this is all you'll need to remember--everyday usage rarely requires calculation of dates outside 1900-2099. (You can easily enough find the Doomsday for other centuries yourself if necessary.)

Next comes the only bit of actual mathematics involved. Take the last two digits of the year you're working with, and do the following:

Count the number of dozens in this number (i.e., divide by 12)
Add on the remainder left over when dividing by 12
Add on the number of 4s in this remainder (i.e., divide it by 4)
For example, if we're talking about 1995, then the last two digits are 95, into which twelve divides 7 times with a remainder of 11, into which four divides 2 times. Thus the number calculated is 7+11+2=20.

This number you've just found represents the offset between that year's Doomsday and the turn-of-the-century Doomsday. In the example above, we've found that Doomsday 1995 is 20 days later than Doomsday 1900 (which was Wednesday). For our purposes multiples of seven obviously don't make any difference, so we can throw away 14 days and simply say that it's 6 days later than Wednesday, i.e., Tuesday. What this means is that in 1995, all of the dates January 31, February 28, April 4, etc., fell on Tuesdays. This makes it easy to find any other date via simple arithmetic.

There's nothing more you need to know. Practice by finding on what day of the week you were born. Here's one example to clarify: let's say you were born on October 7th, 1968. Remember that the Doomsday for 1900 was Wednesday, and we need to find by how much 1968 differs from that. Twelve divides 5 times into 68, with remainder 8. Four goes twice into this remainder. Add the three results: 5+8+2=15, which (throwing away a couple of multiples of seven, i.e., 14 days) is an offset of 1 day from 1900's Doomsday. So Doomsday 1968 is Thursday, which in particular means the 10th of October was a Thursday. Therefore the 7th of October, coming three days earlier, was a Monday.


Postscript: Here's a poetic way to describe the Doomsday algorithm, possibly due to Kate Larson (at least, it appears on her homepage at http://www.cs.wustl.edu/~ksl2/mathpoem.html):

The last of Feb., or of Jan. will do
(Except that in Leap Years it's Jan. 32)
Then for even months use the month's own day,
And for odd ones add 4, or take it away*

Now to work out your doomsday the orthodox way
Three things you should add to the century day
Dozens, remainder, and fours in the latter,
(If you alter by sevens of course it won't matter)

In Julian times, lackaday, lackaday
Zero was Sunday, centuries fell back a day
But Gregorian 4 hundreds are always Tues.
And now centuries extra take us back twos.

* According to length or simply remember,
you only subtract for September, or November.