Quote of the Day

Every new body of discovery is mathematical in form, because there is no other guidance we can have.

— Charles Darwin

## Introduction

I discussed a recent dual-modulus counter design in a previous post. I had not thought much about the history of these counters, but I noticed that our calendar is really a dual-modulus counter. Pope Gregory XIII (Figure 1) established the Gregorian calendar (1582) to resolve issues with the Julian calendar. The reason that calendar development is complicated is because a solar year is 365.24219879 days long, which is not easily expressed in terms of simple integer ratios. Ideally, a calendar system is chosen that is simple and that has a mean year length exactly equal to that of a solar year. While not ideal, the Gregorian calendar provides a simple and fairly accurate approximation to a solar year through the use of a dual-modulus counter design based on years with durations of 365 and 366 days.

## Analysis

In the Gregorian calendar, years have lengths of either 365 or 366 days (hence, a dual-modulus). The number of days in a year is given by the following rules

- Every year that is exactly divisible by four is a leap year, except for years that are exactly divisible by 100.
- Years exactly divisible by 400 are still leap years.

Using these rules, we can compute the length of a Gregorian year as shown in Equation 1.

Eq. 1 |

This is a good approximation to the length of a solar year – the error is only 0.0031 days per year. This means that the it will take over 3000 years for the Gregorian calendar to accrue a single day's worth of error.

Pingback: Dual Modulus Counter Design Example | Math Encounters Blog