The Doomsday algorithm

Pointless skills, number 218: calculating the day of the week for any given date. There are a lot of different ways to do it but I like this method, due to John Conway.

The trick involves knowing what day of the week the last day of February was for the year in question. If you know this day (which Conway calls Doomsday), you can get close to the required date by knowing that Doomsday always recurs on the same dates:

  • January 3 (normal years) or January 4 (leap years)
  • February 28 (normal years) or February 29 (leap years)
  • March 0 (in other words, March the Nth will be N days after Doomsday)
  • For the remaining even months, the same day as the month (April 4, June 6, August 8, etc.)
  • For the remaining odd months, use the mnemonic ‘I work 9-5 at the 7-11’. So the 9th day of the 5th month and vice versa, and the 7th day of the 11th month and vice versa.

So if Doomsday for a particular year is Wednesday, and you want the date of the 9th of April, then since Doomsday always recurs on the 4th of April, the 9th is a Monday.

It is a lot easier to do than to read about, try it with a couple of dates from this year and check it against the calendar.

Part 2 of the trick is how to find Doomsday for a given year. Divide the last two digits of the year by 12 (this is taking you back to tens and units at primary school if you remember that. We had little plastic blocks, anyway that is not germaine to the issue.) So 1938 would be 38 / 12 = 3, remainder 2. Now divide that remainder by 4, so 2 / 4 = 0 (ignore the remainder).

Add up the digits you just worked out ( 3 + 2 + 0 = 5 ). This tells you how far away Doomsday is from the ‘anchor day’ for that century, which for the 20th century was Wednesday. So Wednesday + 5 days = Monday. So Doomsday for 1938 was Monday.

Again that is a lot easier to do, after a little practice, than to try and follow someone telling you about it. What’s that? A hand up at the back? How do you know the anchor day for the century? Well that is easy, for this century it is Tuesday (“Y-Tue-K”), and Wednesday for the last century, when most of us were born (“We-in-dis-day”). For the other centuries lookitup boy lookitup lookitup.

Most of the time the only years you will need to remember is this one and next (Doomsday for 2010 is Sunday, and for 2011, Monday).

This is a good skill and once you have done it a few times it is super easy. Obviously once you know the Doomsday for this year and the next you can just remember it. Who is going to ask you what day something was in 1938 anyway, but if they do and you get it wrong, just claim their memory was addled by the 60s.

So have a go. Amaze your friends, if only with how much spare time you seem to have for memorising pointless things.

0 comments on The Doomsday algorithm

    Post new comment

    The content of this field is kept private and will not be shown publicly.
    CAPTCHA
    This question is for testing whether you are a human visitor and to prevent automated spam submissions.
    By submitting this form, you accept the Mollom privacy policy.