Determination of the day of the week day of the week begins by starting from an ‘anchor date’: a known pair (such as January 1, 1800 as a Wednesday), determining the number of days between the known day and the day that you are trying to determine, and using arithmetic modulo 7 to find a new numerical day of the week. One standard approach is to look up (or calculate, using a known rule) the value of the first day of the week of a given century, look up (or calculate, using a method of congruence) an adjustment for the month, calculate the number of leap years
Determination of the day of the week where is the day of the week (counting upwards from 1 on Sunday instead of 0 in Gauss's version); and , , and are numbers depending on the day, month, century and year which are tabulated in the "Complete table: Julian and Gregorian calendars" above. Note that the numbers tabulated for y can also be described by the following equation: Where So, for example, if you want to find 'y' for the year 1987: In Zeller’s algorithm, the months are numbered from 3 for March to 14 for February. The year is assumed to begin in March; this means, for