User Tools

Site Tools


doomsday

Doomsday Algorithm

Doomsday Algorithm was an innovation by John Conrad for quickly mentally calculating the day of the week (e.g., 2001-09-11 was a Monday). It does so by associating a specific day of the week with a given year and identifying days in each month that always fall on that day with a simple mnemonic system, and also teaches how to find that specific weekday in other years within a century and the day for a given century. That day, for whatever reason, is called the *doomsday*.

It's a nifty parlor trick, a decent mental exercise, and takes about as much skill as learning to solve a Rubik's cube in under a minute.

Monthly doomsdays

The monthly doomsdays (after February) are trivial to remember: they fall on the same day as the month's number.

Even “doomsdays”
Month Day
April 4
June 6
August 8
October 10
December 12

Odd doomsdays (after March) have a dumb mnemonic, “I work 9-5 at the 7/11” :

Odd “doomsdays”
Month Day
May 9
July 11
September 5
November 7

March is an odd case: its doomsday is the 0th, or the last day of February. (so it's also March 7th, 14th, etc)

Depending on whether a year is a leap year or not, the Doomsday is likewise the 28th or 29th of February.

The trick for figuring out January's doomsday is easy: 3/4ths of the time, a year isn't a leap year, so the doomsday is January 3rd. That 4th time, when a leap year occurs, it's January 4th. So, to summarize:

Month Doomsday
January 3 / 4
February 28 / 29
March 7
April 4
May 9
June 6
July 11
September 5
October 10
November 7
December 12

Not all of our brains are used to working with modulo seven, so here's an expanded table that can be memorized or used to learn the modulo seven operation. This is just for regular years. You can make your own chart for handling leap years.

Months Days
February, March, November 0, 7, 14, 21, 28
August 1, 8, 15, 22, 29
May 2, 9, 16, 23, 30
January, October 3, 10, 17, 24, 31
April, July 4, 11, 18, 25
September, December 5, 12, 19, 26
June 6, 13, 20, 27

Can you figure out this year's doomsday if you know the current date and day of the week? Try calculating other dates this year and consult a calendar to see whether it works out.

Yearly doomsdays

Given the last exercise, with enough practice, calculating days of the week should be fairly trivial after you learn a year's doomsday. But what about doomsdays for other years? A simple algorithm was developed for this. The century doomsday of this century is Tuesday . This algorithm is based around the decade and digit years, eg for dates 2000 - 2099:

  1. Is the current 2 digit year odd? If so, add 11.
  2. Divide it by 2.
  3. Is the current 2 digit year odd? If so, add 11.
  4. Count how many days it is from your new number to a multiple of 7.

In case you're rusty on your 7s tables, the multiples of 7 are: 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105. Let's look at 2 examples of this algorithm in practice:

23:

  1. is odd, add 11. → 34
  2. divide by 2 → 17
  3. is odd, add 11. → 28
  4. 0 days until a multiple of 7 (28)

That means 2023 has the same doomsday as the century year, Tuesday. Let's try another:

36:

  1. isn't odd → 36
  2. divide by 2 → 18
  3. isn't odd → 18
  4. 3 days until a multiple of 7 (21)

Tuesday + 3 = Friday. Lo and behold, Friday is the doomsday of 2036.

doomsday.txt · Last modified: 2023-04-20 12:06 by root

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki