Day 241 · Aug 28

The Mathematics of the Gregorian Calendar – Leap Years

The Gregorian calendar (1582) reformed the Julian calendar to correct drift. Rule: leap year if divisible by 4, except centuries not divisible by 400. So 1900 not leap, 2000 leap. Average year length = 365 + 1/4 – 1/100 + 1/400 = 365.2425 days. The tropical year is 365.2422 days – error 0.0003 days/year → 1 day every 3,333 years. The weekday algorithm (Zeller’s congruence) computes day of week for any date. The calendar is a piece of applied modular arithmetic, with prime moduli 7 and various month lengths.

Use Zeller’s congruence to determine what day of the week your birthday falls on this year. The formula: h = (q + floor(13(m+1)/5) + K + floor(K/4) + floor(J/4) – 2J) mod 7.

Practice related topics on DuelMath

Challenge someone →