If you’re trying to plan your next birthday party or thinking about your wedding anniversary, you may be wondering what day of the week that milestone will fall.
And while you always have the calendar on your phone to help you plan, wouldn’t it be great if you could quickly calculate the date? Well, there is a mathematical formula that allows you to do it.
The trick, called Zeller’s formulagives you the day of the week for any date using this formula: d=k+[(13m-1)/5]+D+[D/4]+[C/4]-2C mod 7.
In the formula, d is the day of the week, where zero means Sunday, one refers to Monday and so on, until reaching Saturday as six, and k is the date of the month, D are the last two numbers of the year and C It’s the century. But be careful, January and February are the 11th and 12th months, since the trick only works if you count March as number one. Furthermore, ‘mod’ is the modulo operation that extracts the remainder of the division between two numbers.
For example, if you want to calculate what day December 7, 1941 fell on, you would use the terms as follows: k = 7, D = 41, C = 19, m = 10. It turns out that the formula is d=7+[(13×10-1)/5]+41+[41/4]+[19/4]-2×19 mod 7. If you first calculate the sums in parentheses, you will get 7+25+41+10+4-38 mod 7. In the end the sum reaches 0 mod 7, which means that the day was Sunday.
Another example would be May 15, 1993. The sum would be d=15+[(13×3-1)/5]+93+[93/4]+[19/4]-2×19 mod 7. The next step would leave us with something simpler: 15+7+93+23+4-38 mod 7. Once calculated correctly, it would give you the number six, which means that The date fell on a Saturday.
#mathematical #trick #day #date #fell