Today is leap year day! Every 4 years (well, almost … read on) we have an extra day in February (the 29th) added to the calendar. For those that have wondered why, here are some interesting facts:

Why do we have leap years?

A leap year, where an extra day is added to the end of February every four years, is down to the solar system’s disparity with the Gregorian calendar. A complete orbit of the earth around the sun takes exactly 365.2422 days to complete, but the Gregorian calendar uses 365 days. So leap seconds, and leap years, are added as means of keeping our clocks (and calendars) in sync with the Earth and its seasons.

Julius Caesar vs. Pope Gregory

The Roman calendar used to have 355 days with an extra 22-day month every two years until Julius Caesar became emperor in the 1st Century and ordered his Alexandrian astronomer Sosigenes to devise something better. Sosigenes decided on a 365-day year with an extra day every four years to incorportate the extra hours, and so February 29th was born.

Why does the extra day fall in February?

All the other months in the Julian calendar have 30 or 31 days, but February lost out to the ego of Roman Emperor Caesar Augustus. Under his predecessor Julius Caesar, February had 30 days and the month named after him, July, had 31. August had only 29 days. When Caesar Augustus became Emperor he added two days to “his” month to make August the same as July. So February lost out to August in the battle of the extra days.

Refining the system about 500 years later

As an earth year is not exactly 365.25 days long, Pope Gregory XIII’s astronomers decided to lose three days every 400 years when they introduced the Gregorian calendar in 1582.

What about leap seconds?

Leap years are not directly connected to leap seconds, but both are for the purpose of keeping the earth’s rotations in line with our clocks and calendars. Leap seconds are added to bring the earth’s rotation into line with atomic time. A leap second was added at the end of June last year, when immediately before midnight dials read 11:59:60.

Atomic time is constant, but the Earth’s rotation is gradually slowing down by around two thousandths of a second per day. Leap seconds are therefore crucial to ensuring the time we use does not drift away from time based on the Earth’s spin. If left unchecked, this would eventually result in clocks showing the middle of the day occurring at night.

The extra second can sometimes cause problems for some networks which rely on exact timings. When a leap second was added in 2012 Mozilla, Reddit, Foursquare, Yelp, LinkedIn, and StumbleUpon all reported crashes and there were problems with the Linux operating system and programs written in Java.

A leap year isn’t every 4 years

The year 2000 was a leap year, but the years 1700, 1800 and 1900 were not. There’s a leap year every year that is divisible by four, except for years that are both divisible by 100 and not divisible by 400. The added rule about centuries (versus just every four years) was an additional fix to make up for the fact that an extra day every four years is too much of a correction.

So far the math has worked ever since but the system will need to be rethought in about 10,000 years’ time. Perhaps when robots take over they will think of something for us!