Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Zeller's Congruence

Numerical Algorithm

Zeller's congruence is an algorithm devised by Christian Zeller in the 19th century to calculate the day of the week for any date on the Julian or Gregorian calendar. It expresses the calculation as a modular arithmetic formula that takes the day, month and year as inputs and returns a number from 0 to 6 corresponding to a day of the week, accounting for the calendar's leap year rules and century adjustments. Because the Julian and Gregorian calendars use different leap year rules, the formula takes a slightly different form depending on which calendar is being used. The method is used in calendar calculations and in computer programs that need to determine a weekday from a date without consulting a calendar table. This description is adapted from Wikipedia contributors under CC BY-SA 4.0; changes were made. https://creativecommons.org/licenses/by-sa/4.0/

Sources
Wikipedia: Zeller's congruence
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.