Weekday Algorithms

Zeller's congruence and Conway's Doomsday rule for weekday from a date.

About this tool

Compare Zeller’s congruence and Conway’s Doomsday method for a proleptic Gregorian date, 1583–9999. Both should give the same weekday. Results update immediately; Today restores your current local date. Small drafts survive reload. Invalid dates remove previous results.

Open Calculation steps to inspect the actual values. Zeller treats January and February as months 13 and 14 of the previous year. J is the century and K the year within it. Its displayed sum is reduced modulo 7 to h: 0 = Saturday, 1 = Sunday, …, 6 = Friday. Negative sums use the non-negative mathematical remainder.

Doomsday starts with the century anchor and adds K + ⌊K/4⌋ modulo 7. The resulting yearly anchor weekday occurs on 4 April, 6 June, 8 August, 10 October and 12 December. The monthly anchor is also on that weekday; moving by the displayed day difference gives the requested weekday. January uses day 3, or 4 in leap years; February uses its last day.

No time-zone offset or historical local calendar reform is applied. A computed weekday does not establish whether that historical location used the Gregorian calendar.