Yesterday I wrote a post outlining mental math posts I’d written over the years. I don’t write about mental math that often, but I’ve been writing for a long time, and so the posts add up. In the process of writing the outline post I noticed a small gap.
In the post on mentally calculating the day of the week I focus on this century, then tersely say “For dates in the 20th century, add 1. For dates in the 22nd century, subtract 2.” This post will expand on that. I’ll say a little more about what these rules mean, how to extend them to other centuries, and why they work.
Dates in the 20th century
Suppose you wanted to know the day of the week for July 4, 1976. You could use the method in the post linked above and end up with Saturday. Moving ahead one day of the week gives you Sunday.
Dates in future centuries
For days in the 2100s you would find the day of the week for the corresponding date in this century, then subtract two days. For the 2200s you’d add three days, and for the 2300s you’d add one day.
The Gregorian calendar repeats every 400 years, so if you can find the days of the week for the years 2000 through 2399, you can find the day of the week for all years in the future by subtracting enough multiples of 400 to get into that range of years. For example, in the year 2825, September 18 will fall on a Thursday because it falls on a Thursday today in 2025.
You could also go backward by centuries as well as forward, but there’s a complication. If you run the Gregorian calendar backward far enough, you run into a time before the Gregorian calendar was adopted.
Why the rules work
So why do the century adjustment rules work? There’s a simple but incomplete explanation, and a more complicated complete explanation.
Partial explanation
The number of days in most centuries, i.e. those not divisible by 400, is
365 × 100 + 24 = 36524
which is congruent to 5 mod 7, which is congruent to −2 mod 7. Dates in the 2100s are 36524 days ahead of their counterparts in the 2000s, so we move back two days in the week. The same applies when going from the 2100s to the 22oos, and from the 2200s to the 2300s.
For example, September 18, 2125 is 36524 days from now—note that February, 2100 will not have a Leap Day—and so it will fall two days earlier in the week, on a Tuesday.
That explanation is mostly correct, but there’s a wrinkle. Not all dates in the 2100s are 36524 days ahead of their counterparts in the 2000s. There are indeed 36524 days between September 18, 2025 and September 18, 2125. But here are 36525 days between January 1, 2000 and January 1, 2100. The former was on a Saturday and the latter will be on a Friday. It would seem that our process is wrong, but it’s not.
Full explanation
Let’s go back and look at the algorithm for finding days of the week,
- Take the last two digits of the year and add the number of times 4 divides that number [1].
- Add a constant corresponding to the month.
- Add the day of the month.
- Subtract 1 in January or February of a leap year.
- Take the remainder by 7.
- Adjust for the century.
Suppose we wanted to find the day of the week for January 1, 2100. The first step gives us 0. The constant for January is 6, so at the end of step 2 we have 6. At the end of step 3 we have 7.
Now comes the key part: in step 4 we do not subtract 1 because 2100 is not a leap year. Step 5 gives us 0, i.e. Sunday. When we adjust for the century by moving back two days, we get Friday.
This explanation is admittedly tedious, but it reveals a subtle part of the algorithm: you have to carry out the algorithm, in particular step 4, for the original year. To find the day of the week for a year in the 2200s, for example, you carry out the algorithm as if it were valid for the 2200s, until you get to the last step.
Related posts
[1] This is known as the year share. There are many ways to calculate it (mod 7) that are less obvious but easier to calculate mentally. It’s interesting that these methods generally look more complicated in writing, but they’re easier to carry out.
The post Day of the week centuries from now first appeared on John D. Cook.