Weekday trainer

Find a year’s Doomsday (fast)

Doomsday is the weekday of the last day of February (Feb 28, or Feb 29 in a leap year). Same numbering as this app: 0 = Sun … 6 = Sat.

  1. Century anchor. Let C be the first two digits of the year (for 1987, C = 19). Computeanchor = (5 × (C mod 4) + 2) mod 7Same pattern as the repeating table: 16xx & 20xx → Tue (2), 17xx & 21xx → Sun (0), 18xx & 22xx → Fri (5), 19xx & 23xx → Wed (3).
  2. Last two digits. Let y = year mod 100. Seta = ⌊y / 12⌋, b = y mod 12, c = ⌊b / 4⌋
  3. Add mod 7.Doomsday = (anchor + a + b + c) mod 7→ weekday name: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday for 0–6.

Example: 2025

  • C = 20 → anchor = (5×0 + 2) mod 7 = 2 → Tuesday
  • y = 25 → a = 2, b = 1, c = 0
  • (2 + 2 + 1 + 0) mod 7 = 5 → Friday

Example: 1987

  • C = 19 → anchor = (5×3 + 2) mod 7 = 3 → Wednesday
  • y = 87 → a = 7, b = 3, c = 0
  • (3 + 7 + 3 + 0) mod 7 = 6 → Saturday

After this, use the same Doomsday weekday with the monthly anchors to reach any calendar date. More background: Doomsday rule (Wikipedia).