The Doomsday Rule

calendarWhile doing a little research for a blog post (one that threatens to turn into a story), I thought I needed to know the day of the week for a certain date, and didn’t have a perpetual calendar to do the job. Calendar calculations are messy things, and without looking at the algorithms, I’m not all that keen on web-based calculators. Fortunately, it’s surprisingly easy to figure out a day of the week in the future or the past. All you have to do is calculate Doomsday. And you don’t have to delve into eschatology to do it.

Doomsday is the term used by British mathematician John H. Conway for the day of the week that the last day of February falls on. His method of calculating the day of the week for a date uses this and patterns in our calendar. For instance, February 28, 2015 fell on Saturday. So did January 3 and March 7. If you look through a 2015 calendar, you can easily see the other dates that fall on Saturday. Now, if you look at a 2014 calendar, you’ll see that this pattern is exactly the same. February 28, 2014, fell on Friday, as did every date that fell on Saturday this year. The only time this changes is in a leap year, and only for the days prior to the last day of February. Doctor Conway’s method, called the Doomsday Rule uses this by picking easy to remember dates in each month that falls on the same say as the last day of February. These are:

Month

Doomsday

Month

Doomsday

January

3; 4 in a leap year

July

11

February

28; 29 in a leap year

August

8

March

7

September

5

April

4

October

10

May

9

November

7

June

6

December

12

Looking at this tablet, you might notice another pattern: If you look at the number of the month, with January = 1 and December = 12, this table becomes:

Month

Doomsday

Month

Doomsday

1

3; 4 in a leap year

7

11

2

28; 29 in a leap year

8

8

3

7

9

5

4

4

10

10

5

9

11

7

6

6

12

12

Once we get to April, the even months follow the same pattern: 4/4; 6/6; 8/8; 10/10; 12/12. For May, July, September, and November, we can use a mnemonic to keep it straight: “I work 9/5 at the 7/11.” Doomsday for September is 5 (9/5); Doomsday for May is 9 (5/9); Doomsday for July is 11 (7/11); and Doomsday for November is 7 (11/7). Since Doomsday is always the last day of February, we’ve got that nailed, which leaves January. There we just have to remember that this falls on January 3, unless it’s a leap year, then it’s January 4.

This is handy, because it makes it easy to memorize and – What? Yes, memorize. Doctor Conway’s method makes it relatively easy to calculate the day of the week in your head. Honest.

Since this is based on mathematics, we also have to assign a number to the day of the week. We do this as follows:

0

Sunday (to remember, call it Nones Day)

4

Thursday (Fours Day)

1

Monday (Ones Day)

5

Friday (Fives Day)

2

Tuesday (Twos Day)

6

Saturday (Sixes Day)

3

Wednesday (Threes Day)

Now all that remains is to calculate the Anchor Day for the century. That’s the day Doomsday falls on for the year divisible by 100. For dates under the Gregorian Calendar, which we use, it repeats every 400 years:

Wednesday

Tuesday

Sunday

Friday

1500

1600

1700

1800

1900

2000

2100

2200

2300

2400

2500

2600

And that’s it. Under the Gregorian Calender, Doomsday can only fall on Wednesday, Tuesday, Sunday, and Friday. That’s because, to keep our calendar in step with the seasons, only years divisible by 100 and divisible by 400 are leap years. 2000 is divisible by 100 and 400, so it was a leap year. 1900 is divisible by 100, but not by 400, so it was not. 2000 was the first such year since 1600, and the world won’t see another until 2400.

If you get confused, remember that unless the year is divisible by 400, you move forward one day for the previous century; otherwise you move forward two days. Doomsday fell on Tuesday in 2000, and we’ll use that for calculating the date for a years beginning in 20. In 1900, Doomsday fell on Wednesday, one greater. But in 1800, Doomsday fell on Friday, two days more than in 1900.

In the same way, Doomsday in 2100 will fall on Sunday, which is two days less than in 2000, and Doomsday will be Friday in 2200, which is two days less than 2100’s.

Once we have our Anchor Day, what we need to do then is to calculate the number of times Doomsday moved forward from that point. Let’s say we want to calculate what day of the week July 20, 1969 fell on. That’s the day Neil Armstrong and Buzz Aldrin landed on the Moon.

We know Doomsday fell on Wednesday in 1900, so that’s 3, and our starting point. 1969 is 69 years more, and since the day of the month moves forward one week day each year, 3 + 69. But we’ve also got to add the leap days, because that moves the week day forward an additional day. Our equation now becomes 3 + 69 + the integer part of 69/4. We can write that as 3 + 69 + int(69/4).

You can see right off that we have a problem. There’s only 7 days in a week, but we’re going to add more than 69 to 3. We do that by dividing it all by 7 and keeping the remainder. The fancy word for this is modulo, and we write that as mod. Now our equation becomes:

(3 + 69 + int(69/4)) mod 7

We can turn this into a general equation by:

(D + year + int(year/4) mod 7,

Where D = the Anchor Day, and year is the remainder of the year divided by 100 (example: 2015 mod 100 = 15).

Let’s give it a try:

(3 + 69 + int(69/4)) mod 7 = (72 + 17) mod 7 = 89 mod 7 = 5.

Doomsday in 1969 = 5. That’s a Friday.

Now we can use this to calculate the day of the week for July 20, 1969. First, remember than Doomsday falls on July 11. 20 – 11 = 9 days. 5 + 9 = 14. That’s bigger than 7, so we could go through the motions of finding 14 mod 7, but notice something: 14 is a multiple of 7, and since Saturday = 6, this means July 20, 1969 fell on a Sunday.

That means the Eagle landed on the Moon on Sunday, July 20, 1969.

You will be relieved to know there’s an easier way to do this. It turns out that Doomsday advances by 1 every 12 years. 5 x 12 = 60, so there’s 5 full sets of 12 years from 1900 to 1969. Using this we can speed up things by:

(3 + 5 + 9 (years since 1960) + int(9/7)) mod 7 = (3 + 5 + 9 + 2) mod 7 = 19 mod 7 = 5 for Doomsday 1969, and the rest of the calculations are the same, and –

Yes, this is a simple method. Yes, I’m serious. Try converting a date to the Julian Date and working out the day of the week from that. Yes, we’ve either got to memorize it or keep tables handy, but the beauty of that is it reduces the calculations to the point we can do it in our heads.

Seriously. Practice to really get this down, and it’s possible to calculate, in your head, the day of the week for any date.

Let’s try another one:

The Declaration of Independence was signed on July 4, 1776. What was the day of the week?

Doomsday for 1700 is 0. 76 / 12 is 6 with 4 left over; the integer portion of 4 / 4 is 1, so:

(0 + 6 + 4 + 1) mod 7 = 11 mod 7 = 4. Doomsday in July falls on 11, so 11 – 4 = 7, which is exactly 7 days earlier. This means it fell on the same day as Doomsday. And since Doomsday, 1776, fell on Thursday (Fours day, remember?) that means the Declaration of Independence was signed on a Thursday.

This is all fine for dates in the Gregorian Calendar, but before that the Western world used the Julian. When each part of the world adopted the Gregorian Calendar depends on where it was, and whether it was Roman Catholic, Protestant, or Eastern Orthodox, and it can get very messy. Spain adopted the Gregorian Calendar by Papal degree in 1582, but Protestant England wasn’t about to jump when the Pope hollered, even if the Gregorian Calendar did fix problems with the Julian. England didn’t come around until 1752.

What this means is that if Florida Governor of Florida Manuel de Montiano was writing a letter on July 18, 1737, Georgia Governor James Oglethorpe could be writing one at the same time on July 29, 1737 because Spanish Florida and British Georgia used different calendars, even though they were right next to each other. Crossing the Georgia/Florida border would move you forward and backward by 11 days. Talk about time travel. They didn’t even need a TARDIS.

It also means you have to be very careful how you calculate the day of the week. What works for Spain in 1589 isn’t going to work for England, and other countries get a lot messier.

By the way, when Britain adopted the Gregorian Calender in 1752, it had to drop those 11 days to get things straightened out. George Washington, who was born on February 11 on the Julian Calendar, moved it to February 22 on the Gregorian Calendar to preserve the actual day. Since New Year’s Day in Britain fell on March 25 until 1752, when it was moved to January 1, Washington also changed the year of his birth from 1731 to 1732, which is the year it would have been had Britain used the Gregorian Calendar. Sharp man, Washington.

So, can you use the Doomsday Rule for Julian Calendars? Certainly. We just have to change how we figure our Anchor Day. For the Julian Calendar, the Anchor Day for a century is:

(6 x int(year/100)) mod 7

For the year 1000 AD, we have (6 x int(1000/100)) mod 7 = (6 x 10) mod 7 = 60 mod 7 = 4. From there, the calculations are exactly the same.

Let’s try it:

“Remember, remember, the 5th of November …” November 5, 1605, is the date when Guy Fawkes was caught with a pile of gunpowder under Parliament to blow it up, thereby becoming, according to some, the last man to enter Parliament with honest intent. What day of the week was that?

England was still on the Julian calendar, so our Anchor Day is 5. Doomsday 1605 was:

(5 + 5 + 1) mod 7 = 11 mod 7 = 4

Doomsday in November is 7, so 5 – 7 = -2; 4 – 2 = 2, which is Tuesday. So Guy Fawkes was caught on Tuesday, November 5, 1605.

Can this work on dates before the 1st Century? Yes, it can, but be aware of hazards. Dates prior to the Julian Calendar are useful fiction. First, the Roman Calendar was so messed up before the Julian Calendar that you can’t take it at face value that an event on, say, January 15, 50 BC would have been on the “real” January 15 had the Julian Calendar existed at that time. To complicate things even more, the Romans didn’t get it quite right when they first adopted the Julian Calendar, and calculated the leap years wrong, and it was years before they caught their error and corrected it by ignoring some leap years. Rest assured, they did get it straightened out, until they noticed it was running just a tad fast, which is how we ultimately got the Gregorian Calendar.

Usually, dates given prior to the Julian Calendar are done by extending it backward in time. It’s a convenient fiction, and lets us calculate when days of the week fell. While we might not be sure of dates, we can the weekday, thanks to Hebrew observance of the Sabbath. We know the same pattern of 7 days extends, unbroken, all the way back.

So, how do we do it? It turns out that the Julian Calendar repeats itself every 28 years. The Gregorian Calender does, too, if you ignore the years divisible by 100. This means all we have to do is to add enough multiples of 28 to make the year positive. For dates way, way, back, we can use multiples of 700, which is just 28 x 25.

Ancient dates can be difficult to nail down, unless there was an astronomical event such as a solar or lunar eclipse, or some other hard date. Babylon fell to the Persians on October 12, 539 BC. What was the day of the week?

First, we have to remember there is no year 0 in our era. Years were reckoned from an event, usually the reign of a sovereign in the West, and ours is reckoned from an estimate of the birth of Jesus Christ. So 1 AD means in the 1st year of our Lord, and after a full year had past, that began the 2nd year of our Lord, and so on. This means we’ve got to shift negative years to make up for the lack of zero. We do this by adding a 1 to close up the gap. So, -539 + 1 = -538.

Next we make it positive by adding a multiple of 28. Let’s add 700 to it, since that’s a nice, round, number, and it’s divisible by 28: 700 – 538 = 162. So a Julian calendar for -539 BC would be the same as the one for 162 AD.

Doomsday for 100 AD = (6 x int(100/100)) mod 7 = (6 x 1) mod 7 = 6 mod 7 = 6. So Doomsday for 167 AD would be (6 + 5 + 2 ) mod 7 = 13 mod 7 = 6.

Doomsday falls on October 10, and Babylon fell on October 12, just 2 days later, So 6 + 2 = 8, and 8 mod 7 = 1. That’s Monday. That means Babylon fell on a Monday. And you thought your Mondays were rough.

Okay, so all this is “neato” stuff, but is there a practical application? Yes. If we know what day Doomsday falls on for a year, we can use that to figure out in our heads when appointments and holidays occur.

Here’s a short holiday cheat sheet, where D = Doomsday:

New Year’s D – 2; D – 3 for leap year Halloween D
Valentine’s D, D – 1 for leap year Veteran’s Day D – 3
St. Patrick’s D + 3 Christmas D – 1
4th of July D

Doomsday in 2015 is 6, which is a Saturday. Without looking at a calender we know New Year’s Day was on Thursday; Valentine’s Day was on Saturday; St. Patrick’s Day was on a Tuesday; 4th of July was on a Saturday; Halloween will be on a Saturday; Veteran’s Day will be on a Wednesday; and Christmas will be on Friday.

Not only that, but if we know Doomsday in 2015 is 6, we also know Doomsday 2016 is 1, since 2016 is a leap year. So New Years 2016 will be on Friday; Valentines’ Day will be on Monday; St. Patrick’s Day will be on Thursday; the 4th of July will be on Monday; Halloween will be on Monday; Veteran’s day will be on Friday; and Christmas will be on Sunday.

You can make your own cheat sheet for special dates in your life, like birthdays or anniversaries.

Oh, and the day of the week I was calculating? Let’s just say that on that date centuries ago, a certain king sat on his throne with his sword, waiting for death as his court partied around him. And that’s history, not fiction.