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.

The world according to keithlard

A jackdaw’s treasury of doodads, nuggets, trinkets and gewgaws. Or more prosaickally it is some things I saw and took pictures of with my electric camera.

I wonder if any rubber suited frogmen saw this sign and got mixed up about where they were supposed to go. I expect they did not. But it would have been comical if they did.

I am frightened of children as it is, but these mannequins were Doctor Who scary.

Book your places now!

Everyone’s a winner when you learn more about road safety.” This is like a joke board game from The Simpsons, that the Flandererses might play. But it is terrifyingly real. According to the box it is as exciting for children as for adults, which I have no trouble believing.

Just don’t even think about it.

A cheerful pie! It seems almost a shame to eat it.


Birthday card for k.s.

You and your goo better turn around, buddy. There’s nothing for you here.

"It's not you... it's me."

Excerpt of a letter from Npower:

We’ll break the news to your current supplier that you’re changing to npower. Please don’t stop your payments to them yet because they can stop your move if you owe them money. Of course they’ll be disappointed that you’re leaving, so please give us a call and check the facts if they try to persuade you to stay with them.”

It is almost like a romantic relationship with my energy supplier. I have to say I’ve never thought of them in those terms. I like Npower, but not in that way.

Dear Powergen,

This is the hardest letter I have ever had to write. I know I have been a little cold and distant lately, I am sorry. The fact is things are just not working out between us. I know I can be demanding, especially in bed, but you just haven’t been satisfying my need for warmth. You only seem interested in getting turned on between midnight and 7am, whereas I want you to be hot and ready all day long.

I have met someone else, on the internet. I know you will say she is cheap, but I’ve been seduced by her attractive tariffs and I feel an instant connection. Do not be upset as I am sure you will meet someone new and even better than me in the future. I think we have just both changed as people and there is not the same spark between us that there once was. I hope you can forgive me and I wish you all the best,