DEV Community

Cover image for Leap days, and the quest for the perfect Calendar
Darshan A S
Darshan A S

Posted on • Originally published at darshan.hashnode.dev

Leap days, and the quest for the perfect Calendar

The story of calendars is a cosmic interplay between astronomy, religion, and history.
And, if you think your schedule is chaotic, just be glad you weren't around when the Romans were messing with time.

Humans have long relied on the cycle of Day and Night for hunting, gathering, and finding their way home after one too many fermented berries.

But our ancestors needed more than just day and night; they needed to predict the fickle seasons for planting, harvesting, and knowing when to throw those wild solstice parties. In short, they needed a calendar!

Enter the Romans!
After all, we all think about the Roman Empire at least once a day, right? RIGHT?


Lunar calendar

Anywho, conveniently enough, like the cycle of day and night, nature had given us yet another cyclical clock in the sky. The Moon! and its phases. The moon, waxing and waning like clockwork every 29.5 days seemed like a natural way to track time. That's how the word Month (literally "Moon-th") originated.

Their first king, Romulus, established a lunar calendar, based on the same idea. It consisted of 10 months, starting with spring (Martius, now March) and ending with the onset of winter (December). The system is usually said to have left the remaining days before the next Spring as an unorganized "winter" since they were irrelevant to the farming cycle.

They began by naming months after their gods. but by the fifth month, they threw their hands up and just named them after the good old Latin numbers.

No. Months Meaning Length in days
1 Martius Month of Mars, the Roman god of war. 31
2 Aprilis Month of goddess Apru. (Aphrodite) 30
3 Maius Month of Maia, a Roman goddess of growth and fertility. 31
4 Junius Month of Juno, the Roman goddess of marriage and queen of the gods. 30
5 Quintilis The Latin word quintus meaning "fifth. 31
6 Sextilis The Latin word sextus meaning "sixth". 30
7 September The Latin word septem meaning "seven". 30
8 October The Latin word octo meaning "eight". 31
9 November The Latin word novem meaning "nine". 30
10 December The Latin word decem meaning "ten". 30
Length of the year 304

Lunisolar calendar

Problem was, predicting the end of that chaotic "winter" period was about as easy as herding cats.

So Numa Pompilius, the second king of Rome, tried something.
He reasoned that roughly 12 moon (lunar) cycles occurred between springs (solar), giving a year 12 * 29.5 = 354 days. But hold on! Even-numbers were considered bad luck in ancient Rome, so Numa tacked an extra day onto the year, making the target length, a peculiar 355 days long. Then, to appease the odd-number-loving gods, he removed a day from the 30-day months, leaving behind 304 - 6 = 298 days.

With 12 moon cycles to cover, Numa still had 355 - 298 = 57 days left over. He split these into two new months: one with 29 days and another with the dreaded even number of 28. The first, named Januarius after Janus, the god of beginnings and transitions, was strategically placed at the start of the year. As for the other month, stuck with its even-numbered fate, it was dedicated to spiritual purification and shoved to the end. They called it Februarius, derived from the Latin word "Februa" meaning "purification."

No. Months Length in days
1 Januarius 29
2 Martius 31
3 Aprilis 29
4 Maius 31
5 Junius 29
6 Quintilis 31
7 Sextilis 29
8 September 29
9 October 31
10 November 29
11 December 29
12 Februarius 28
Length of the year 355

But, each year fell short of a tropical year by a few days, causing the seasons to drift like a ship without a rudder. After some head-scratching and sky-gazing, the Romans realized their calendar was off by a whopping 45 days every four years!

So Numa decided to throw in an extra, intercalary month, called Mercedonius, every other year. This bonus month alternated between 22 and 23 days. To make things tidier, and since Feb 23rd was Terminalia (festival of God Terminus, who presided over boundaries), Numa ended Feb on 23rd and moved the remaining 5 days to the intercalating month to make them 27 and 28 days long. And at the same time, Jan and Feb both were moved to the beginning of the year.

No. Months Year 1 Year 2 Year 3 Year 4
1 Januarius 29 29 29 29
2 Februarius 28 23 28 23
Mercedonius 0 27 0 28
3 Martius 31 31 31 31
4 Aprilis 29 29 29 29
... ... ... ... ... ...
12 December 29 29 29 29
Length of the year 355 377 355 378

Essentially making the average of all 4 years into (355 + 377 + 355 + 378) / 4 = 366.25
This jumbled mess of intercalary months and shifting start dates became known as the Roman Republican Calendar. It was a far cry from perfect, but hey, it was a start.

This is still too many days, but it could have worked. Every 19 solar years would line up with 235 lunar months. Add enough leap months and eventually, everything will reset itself. The seasons will be back on track.

But the leap months weren't added as planned. Politicians would get them to extend leap month when it's their office and to skip the month when it's their opponents. Also, it was a custom that intercalation had to be personally announced by the chief pontiff in Rome. So, during wars, when the king was out of the city, the leap month was forgotten for years.


Solar calendar

By the time Julius Caesar came to power, things were confusing. He had spent a long time in Egypt, where 365-day calendars were all the rage. So in 46 BC he threw the lunisolar calendar away and ordered his scholars to help design a solar calendar. He got rid of the intercalary month of Mercedonius, leaving the original 355 days long year. Caesar then sprinkled the missing 10 days across various months, reaching a total of 365.

The year 46 BC was the last of the old system and included three intercalary months, the first inserted in February and two more—Intercalaris Prior and Posterior—before December, coincidentally making the year of Caesar's third consulship last for 446 days!

But wait! By now, astronomers knew the tropical year was slightly longer—closer to 365.25 (365 days and 6 hours). So, Caesar added a leap day every four years. However, in a move that would baffle future generations, he inserted it after February 23rd, by doubling 24th, right smack in between the month – there were indeed two days dated 24 February!

No. Months Length in days
1 January 31
2 February 28 + (1 every 4 years)
3 March 31
4 April 30
5 May 31
6 June 30
7 July 31
8 August 31
9 September 30
10 October 31
11 November 30
12 December 31
Length of the year 365 + (1 every 4 years)

Following Caesar's assassination, the priests mistakenly added the bissextile leap day every three years due to their inclusive counting. To bring the calendar back to its proper place, Augustus, the next King, was obliged to suspend intercalation for one or two decades.

As a tribute to their egos (ahem, I mean contributions), the 7th and 8th months were renamed Julius (for Caesar, obviously) and Augustus (for his successor).


A better solar calendar

Unfortunately, the Julian calendar wasn't flawless. It assumed the average solar year was exactly 365.25 days long, overestimating by about 14 minutes. By the year 1582, the excess leap days introduced by the Julian algorithm had caused the calendar to drift such that the March equinox was occurring well before its nominal 21 March date. This date was important to the Christian churches because it is fundamental to the calculation of the date of Easter.

To reinstate the association, the then Pope, Pope Gregory XIII, did something crazy to the year 1582. He skipped 10 whole days from the calendar! Thursday, October 4th was followed immediately by Friday, October 15th! Good luck negotiating the rent, I guess?

Calendar of the year 1582 at Italy

To ensure that the drift doesn't happen again, Gregory introduced a new calendar, aptly named the Gregorian calendar.
By this time, it was known that a solar year was close to 365.24 days (That's 365 days, 5 hours, 45 minutes, and 36 seconds; for those still keeping track), while the Julian year was 365.25 days. This meant every 1 / (365.25 - 365.24) = 100 years an extra day has been accumulated. So, the Gregorian calendar chose to skip adding a leap day every centennial year (those divisible by 100)

But, the solar year was a smidge longer, around 365.2425 days long. (365 days, 5 hours, 49 minutes, and 12 seconds) Which meant every 1/ (365.2425 - 365.24) = 400 years a day has been lost. So, the Gregorian calendar chose to add back a leap day every centennial year divisible by 400.

This is the calendar we all know (and love?) today. Every year that is exactly divisible by 4, you add a leap day; except for years that are exactly divisible by 100, then you remove the leap day that you would have otherwise added; except if it is divisible by 400, you add back the leap day!

It took 170 more years, for Britain and its colonies, including India, to follow suit. They skipped 11 days, wherein, Wednesday, 1752, September 2nd was followed by Thursday, September 14.

Calendar of the year 1752 at India

In fact, the world is still adopting the Gregorian. Saudi Arabia, for instance, jumped on the Gregorian wagon as late as 2016!


Future

So, we finally nailed it right? Close, but not quite.

Turns out, the solar year is even shorter than the Gregorian calendar accounts for. The latest measurements put it at a mind-bogglingly precise 365.2421897 days. (365 days, 5 hours, 48 minutes, 45 seconds, 19.008 mili-seconds). How long does this take to accumulate an extra day? 1 / (365.2425 - 365.2421897) ~= 3223 years!

Following the pattern, it seems logical to add back a leap day every 4,000 years, averaging out to 365.24225 days. This would make the calendar drift by a day only once every 1 / (365.24225 - 365.2421897) ~= 16584 years! So, why aren't we doing it?

Well, for starters, as we saw with Gregorian, getting the entire world to adopt a new calendar is nowhere close to easy. But there's a more fundamental reason: it wouldn't be worth the effort.

The solar year—the time it takes Earth to orbit the sun—is gradually increasing, as is the length of a day. Currently, the length of the year is changing in the sixth decimal place over a person's lifetime. Various cosmic forces are at play here, deserving a blog post in their own right. Any correction based on today's solar year length would become obsolete in a few millennia, requiring yet another adjustment anyway.

So, for now, we're stuck with the Gregorian calendar, a marvel of human ingenuity with its quirks and imperfections. What makes this feat even more remarkable is that telescopes weren't even invented when these calendars were designed! All of this was achieved with the naked eye, by observing the shadows cast by sticks and gazing up at the celestial dance above.

As we navigate the complexities of our modern world, perhaps we can take a cue from the ever-shifting cosmos and embrace the fluidity of time itself. After all, isn't life a little more adventurous when we're not always running on schedule?


Bonus

  • Use timeanddate.com to look at calendars of any year in any given country.
  • Try finding the 10-day skip in October of 1582 in Italy!
  • Try finding the 11-day skip in September of 1752 in India!
  • Look at the Adoption dates of Gregorian Calendar by Country table, to find when a given country adopted the Gregorian and how many days they skipped to synchronize.
  • Which country skipped the most days? Check out the same in the timeanddate tool above.

Sources and references:

Top comments (0)