In part 1 we saw how to figure out any day of the week for 2017, just by adding two numbers. Fast, powerful, and (for the nerdishly inclined) very cool.

But 2017 will pass, and sooner or later someone will want to know the day they were born, or something else non-2017ish – then what?

The reason I started with 2017 is that it is a gradual introduction into the full calculation, which can have as many as six steps, versus the two needed for this year:

- Add a century year offset value.
- Add the non-century years (65 for 1965, 12 for 2012, etc.)
- Add the leap years (non-century years divided by 4, ignoring the fractions.)
- Subtract 1 if the year is a leap year, AND the date to consider is in Jan. or Feb.
- Add the month number.
- Add the date number.

For simplicity, you’ll take this final number and subtract 7s from it, until you have a number from 0-6.

Let’s look at November 15, 2017 again, which we determined in Part 1 was a Wednesday:

- Add a century year offset value. For 2000-2099, the value is 0.
- Add the non-century years (17 for 2017.) So we are at 0+17=17.
- Add the leap years. 17/4=4.25, so we use only the 4. 0+17+4=21.
- Subtract 1 if the year is a leap year… Not a leap year, so: 0+17+4+0=21
- Add the month number: 2 for November, so 0+17+4+0+2=23.
- Add the date number, 15th, so 0+17+4+0+2+15=38.

Take 38, and reduce it by removing 7s: 38 is 35+3, or (5*7)+3, so we get rid of the 7s, and end up with 3, or Wednesday.

See why 2017 is so simple? The first four steps end up with 21, which is evenly divisible by 7. So we skip them, and just do the final 2, and then get rid of the 7s.

And if it is a date in the 2000s, and not a leap year, we still skip steps 1 and 4.

Well, then, what about a hard date? Say, a leap year last century, like January 29th, 1988?

- Add a century year offset value. For 1900-1999, the value is 1.
- Add the non-century years, so we are at 1+88=89.
- Add the leap years. 88/4=22, so we get 1+88+22=111.
- Subtract 1 if the year is a leap year, AND the date to consider is Jan. or Feb. So we get 1+88+22-1=110.
- Add the month number. 6 for January, so 1+88+22-1+6=116.
- Add the date number. 29th, so 1+88+22-1+6+29=145.

145 is 140+5, or (20*7)+5, so we get rid of the 7s, and end up with 5, or Friday.

Six steps, and you’ve got the day of the week for two centuries’ worth of dates!

(One caution – 1900 is a special case, and NOT a leap year, so January 1, 1900 is a Monday, not a Sunday – try it and see. But 2000 IS a leap year – that’s calendars for you!)

But even with six steps there is a fair amount to keep track of and do in the head. I tend to follow these steps like this, for example using July 12th, 1979:

- Add the leap years. The hardest part of the calculation is the divide by 4, so I do this first, by dividing by 2 twice and throwing away the fraction. So, 79/2 is 39.5 or 39, and 39/2 is 19.5 or 19. Another trick is I can throw away the sevens anytime to keep the total small, so 19-7-7=19-14=5.
- Add the non-century years, so add 79. From 79 I can immediately remove 77 (11*7) so I get 2, for a total of 5+2=7. Another 7! So I throw that away and get 0 so far (another way to look at it is 5+79=84, which is 12*7, so I end up with 0 this way as well…)
- Add a century year offset value. For 1900-1999, the value is 1. 0+1=1.
- Subtract 1 if the year is a leap year… Nope for 1979, so still 1+0=1. (Hint: If you had any fractions when doing the first step, it wasn’t a leap year.)
- Add the month number. 5 for July, so 1+5=6.
- Add the date number. 12th, so 6+12=18=14+4=7+7+4. Take away the 7s and the end result is 4, or Thursday.

Practice a bit, and you’ll see how easy it is to calculate the day of the week for any date. And even if you don’t use it often, you’ll find yourself paying attention to the day of the week more, and being able to answer questions like “what day was the 19th?”

And of course, with a teeny bit of effort, you’ll be able impress people by telling them the day of the week they were born and many other dates…