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 first days are a whole number of weeks apart. For example, February of a common year corresponds to March because February has 28 days, a number divisible by 7, 28 days being exactly four weeks. In a leap year, January and February correspond to different months than in a common year, since adding February 29 means each subsequent month starts a day later. The months correspond thus: For common years: For leap years: For all years: In the months table below, corresponding months have the same number, a fact which follows directly from the definition. There are seven possible days