Why the Calendar Needed a 10-Day Delete
By 1582 the spring equinox had drifted to 11 March. Easter, pegged to that equinox, was sliding toward summer. The Julian calendar’s rule (a leap year every four years) made the average year too long. The error per year was small. The accumulated error was not: 10 days since 45 BC.
Pope Gregory XIII’s commission did two things. First, delete 10 days. The day after 4 October 1582 became 15 October. Second, tighten the leap-year rule. A year divisible by 4 is a leap year unless it is a centurial year not divisible by 400. That single change dropped three leap years every four centuries. The average year shortened enough that drift slowed to roughly one day in a span far longer than any software system will run.
The reform was a papal decree, not a treaty. Spain, Portugal, Italy, France, and Poland adopted it immediately. Protestant and Orthodox states did not.
Why Protestant Europe Refused
The theological objection was straightforward: the calendar came from Rome. Scientists in Protestant countries agreed the reform was correct. Governments did not care. The British Empire, including the American colonies, held out until 1752. By then the gap had reached 11 days. Sweden tried a gradual transition by skipping leap years. It failed. They reverted to the Julian calendar, then switched abruptly.
The Eastern Orthodox Delay
Russia kept the Julian calendar until 1918. The gap had grown to 13 days. The October Revolution of 1917 happened in November by the Gregorian calendar. Greece became the last European holdout, switching in 1923. The Orthodox liturgical calendar still uses the Julian reckoning for fixed feasts. That is why Orthodox Christmas falls on 7 January in Gregorian countries.
How the Calendar Became a Computing Default
The Gregorian calendar did not spread by consensus. It spread because the empires that adopted it (Spanish, French, British) embedded it in colonial administration, trade contracts, and shipping schedules. By the early 20th century, international railway timetables and telegraph networks ran on Gregorian dates. When computers arrived, the default was already set.
The Soviet Union adopted it in 1918. Japan adopted it in 1873 alongside the Meiji Restoration, keeping traditional era names for domestic use. China switched in 1929 after the Qing dynasty fell. Saudi Arabia, the last country using the Islamic lunar calendar for civil purposes, moved official government business to the Gregorian calendar in 2016.
The Proleptic Gregorian Calendar: Extending Backwards
When computers needed to represent dates before 1582, they used the proleptic Gregorian calendar: the same leap-year rules extended backward. 1 January 1 AD in the proleptic Gregorian calendar is not the same day as 1 January 1 AD in the Julian calendar. The difference is two days in the first millennium, growing to 10 days by 1582.
Where the Proleptic Calendar Appears
ISO 8601 uses the proleptic Gregorian calendar. So does the Unix epoch. A date string like “0001-01-01” in an ISO 8601 timestamp is a proleptic Gregorian date. This matters for historical datasets, astronomical calculations, and any system that stores dates far in the past. A historian entering a Roman date into a database may be off by days without knowing it.
Julian Day Number: A Separate Count
The Julian Day Number, used by astronomers, is a continuous count of days from noon Universal Time on 1 January 4713 BC in the proleptic Julian calendar. Despite the name, it has no connection to the Julian calendar’s leap-year rules for civil dates. It simply avoids the Gregorian reform entirely by counting days.
Unix Epoch and the Simplification of Time
Unix time defined 1 January 1970 00:00:00 UTC as the epoch. Before that, early Unix systems used a 60 Hz clock and set the epoch to whenever the system last rebooted. The epoch was standardized retroactively to simplify calculations for then-current systems.
The design decision that mattered: every moment became a single integer. No months. No days. No time zones. Seconds since the epoch, with leap seconds ignored as POSIX mandates. That integer can be added, subtracted, and compared without parsing. It solved the problem of representing time across machines and networks.
Today time_t is a 64-bit signed integer on most systems, good for roughly 292 billion years. The transition from 32-bit (which overflows on 19 January 2038 at 03:14:07 UTC) was mostly complete by the 2010s. Embedded devices and legacy databases are the remaining risk. For more on that, see The Year 2038 Problem.
Calendars That Coexist with Gregorian Computing
The Gregorian calendar dominates computing. It is not the only calendar in use. The Islamic (Hijri) calendar is lunar, with 12 months of 29 or 30 days. It shifts roughly 11 days earlier each Gregorian year. Saudi Arabia uses it for religious purposes; the Umm al-Qura variant is the most common algorithmic version.
The Hebrew calendar is lunisolar. Months follow the moon. Years follow the sun. A 19-year cycle adds a leap month (Adar I) seven times per cycle to keep Passover in spring. The Chinese calendar is also lunisolar, with leap months determined by the position of the sun relative to the 24 solar terms.
CLDR: The Data Layer That Makes Conversion Work
The Unicode CLDR (Common Locale Data Repository) supplies the localized month names, weekday names, date formats, and conversion rules for each locale. When a phone displays a Hijri date or a Hebrew date, it is using CLDR data. The IANA time zone database covers only time zones and DST rules, not calendars. Calendar conversion is a separate layer.
Libraries That Handle Non-Gregorian Dates
Python’s hijri-converter, JavaScript’s Intl.DateTimeFormat with calendar: 'islamic', and Java’s java.time.chrono.HijriChronology all rely on CLDR for conversion algorithms. No single library covers every calendar. Developers working with multiple non-Gregorian calendars typically stack a general internationalization library with a calendar-specific package.
The ISO 8601 Week Date: A Calendar Within a Calendar
ISO 8601 defines week dates: a year, a week number (01 to 53), and a weekday (1 to 7, Monday is 1). The week numbering system derived from earlier European commercial practice, especially German DIN 1355.
The rules: weeks start on Monday. Week 1 contains the year’s first Thursday. Equivalently, week 1 is the week with at least four days in the new year. This means 29, 30, and 31 December can belong to week 1 of the next year. 1, 2, and 3 January can belong to the last week of the previous year.
Where Week Numbers Show Up
Manufacturing uses week numbers for production scheduling. Payroll systems use them to define pay periods. Academic calendars use them for semester planning. Software teams use them for sprint tracking. Many organizations report by ISO week instead of by month because weeks are equal-length units. Months are not.
The Week 53 Edge Case
Some years have 53 ISO weeks. It happens when 31 December falls on a Thursday, or when it falls on a Friday and the year is a leap year. Systems that assume exactly 52 weeks per year break on those dates. For the full rules and a calendar, see ISO Week Numbers Explained.
How Calendar Rules Interact with Time Standards
| Concept | Key Rule | Why It Matters |
|---|---|---|
| Gregorian calendar | Leap year every 4 years, except centurial years not divisible by 400 | Global default for computing |
| Proleptic Gregorian | Same rules applied backward before 1582 | Used by ISO 8601 and Unix epoch |
| Unix epoch | 1 Jan 1970 00:00:00 UTC | Single integer for every moment |
| ISO 8601 week date | Week 1 contains year’s first Thursday | Manufacturing, payroll, sprints |
| CLDR | Provides localized names and conversion rules | Enables Hijri, Hebrew, Chinese calendars |
| IANA tz database | Public domain time zone rules | Used by every OS and browser |