I often need to know the day of the week for a recent date, or more often, the day of the month today when I know what day it is today. You can find a good amount of information on Wikipedia. I’ll share my version here, which is the basic method on Wikipedia with my own tweak. I’m not interested in complex methods or showing off the ability to instantly determine the day of the week for a date far away. I just want to solve the little annoyance in my daily life.
The formula is simple:
(y + m + d) modulo 7
The result is:
0=Sunday, 1=Monday, 2=Tuesday, … 6=Saturday
In the formula, d is the day of the month, m is the month number and y is the year number. You need to memorize m and y, which is the only tricky part. My month table is offset +2 to the one on Wikipedia, and use -2 instead of 5. I felt mine is easier to memorize, but you can pick your own version, too. (There are 7 possible versions.)
|Month||Month number||Memorization tip|
|Jan||2||1-2 (one, two)|
|Feb||-2||2–2 (two, minus-two)|
|Mar||5||3-5 (paired with May); 5 letters in March|
|May||3||5-3 (paired with March); 3 letters in May|
|Jun||6||6-6 (six, six)|
|Aug||4||8-4 (half of 8)|
|Jan||1||1-1 (one, one)|
|Feb||4||2-4 (double of 2)|
* To memorize (or understand) the month numbers of April, July and September through December, you should notice that April and July share the same number, and same with September and December. Why? Because there are 30, 31 and 30 days in April, May and June (or September, October and November), which map to 2, 3 and 2 after modulo 7, and 2+3+2=7. So after 3 months, July repeats the day-of-the-week pattern of April. That also explains why the month number of October is 2 and November is -2.
|Year||Year number||Year||Year number|
|2012||-2 (or 5)||2022||3|
|2013||-1 (or 6)||2023||4|
|2014||0||2024||-1 (or 6)|
|2018||-2 (or 5)||2028||4|
|2019||-1 (or 6)||2029||-2 (or 5)|
|2020||1||2030||-1 (or 6)|
You actually need not memorize the year table, because it changes so seldom. After a few applications, you’ll be very familiar with recent year numbers.
Let’s see some examples:
- 2014-07-22: y=0, m=1, d=22; (0 + 1 + 22) mod 7 = (0 + 1 + 1) mod 7 = 2 mod 7 = 2
- 2014-11-22: y=0, m=-2, d=22; (0+ -2 + 22) mod 7 = (0 + -2 + 1) mod 7 = -1 mod 7 = 6
- 2013-12-31: y=-1, m=0, d=31; (-1 + 0 + 31) mod 7 = ( -1 + 0 + 3) mod 7 = 2 mod 7 = 2
To determine the day of the month is similar, but you use subtract instead of addition in the formula:
d – y – m
The result is the day of the month modulo 7, so there are quite a few possibilities, but since you usually know the rough range, you can usually determine the day of the month for today. For example, today is Wednesday, this month is July 2014, and you know the day of the month is twenty-something. We have:
d=3, y=0, m=1; 3 – 0 – 1 = 2
So today is 23 (23 modulo 7 = 2), or 16, or 30. You pick one.
Hope that helps.