On the Subject of Weekdays

What day is it today? Hang on, I know today’s date. Give me a minute.

  • Enter the correct day of the week corresponding to the shown date. The used date format is: YYYY-MM-DD.
  • Enter the weekday before the timer runs out.

Calculating the weekday

  1. Split the year into centuries and remaining years. (1994 becomes 19 & 94)
  2. Add the following numbers:
    • Centuries modulo 4, mapped using Table 1.
    • If the remaining years are an odd number, add 11 to it. Divide the resulting number by 2. Again, if the number is odd, add 11. Find the difference between the nearest multiple of 7 above this number and the number itself.
    • The day of the month.
    • The month mapped to a number from Table 2.
  3. Keep subtracting 7, until the resulting number lies in 0-6. Mondays are 0, Tuesdays are 1, and so on.

Table 2

MonthCommonLeap
May, December, September92
July, April33
November, March00
October44
February0-1
June11
August-1-1
January-33

Determining leap years

Take the following steps in order to determine whether a given year is a common or a leap year:

  • Year not divisible by 4: common year
  • Year not divisible by 100: leap year
  • Year not divisible by 400: common year
  • Otherwise leap year

Table 1

CenturiesResult
01
16
24
32