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 his collected works in 1927. Gauss' method was applicable to the Gregorian calendar. He numbered the weekdays from 0 to 6 starting with Sunday. He defined the following operation: The weekday of 1 January in year number is where is the remainder after division of by , or modulo . This formula was also converted into graphical and tabular methods for calculating any day of the week by Kraitchik and Schwerdtfeger. Another variation of the above algorithm likewise works with no lookup tables. A slight disadvantage is the unusual month and year counting convention. The formula is where For example,