In: Advanced Math
According to Zeller's Formula, the day of the week can be calculated by:
f=k+(13m−1)/5+D+D/4+C/4−2C
where:
•k is the day of the month.
•m is the month number designated in a special way: March is 1, April is 2, . . . , December is10; January is 11, and February is 12. If x is the usual month number, i.e. for January x is 1, for February x is 2, and so on; then m can be computed with this formula:m= (x+21)%12+1,where % is the usual modulus (i.e. remainder) function. Alternatively,m can be computed in this way:
m= x+10, if x≤2, or x−2 otherwise.
•D is the last two digits of the year, but if it is January or February those of the previous year are used.
•Cis for century, and it is the first two digits of year. In our example,C=20.
•From the result f we can obtain the day of the week based on this code:
Day0 = Sunday...Day 6 = Saturday
For example, if=123, thenf%7=4, and thus the day was Thursday. Again, % is the modulus function.
What was the day on June, 1 2005 according to Zeller's formula?