It's leap day, and scientist Chris Turner uses his extra time to muse in the New York Times on its origins. Julius Caesar came up with a plan—pinning the calendar to the Earth's circling of the sun—in 46 BC as a way to synchronize months with the seasons. But one circuit takes 365 days, 5 hours, 49 minutes, creating the need for an extra day every 4 years.
By 45 BC, having suffered just one confusing year of temporary corrective months, Caesar had done the trick. Almost. His Julian calendar proved 11 minutes per year too long; by the 16th century, it was was running 10 days ahead. Enter Pope Gregory XIII. In 1582, he got the discrepancy down to 30 seconds a year, creating the calendar we still follow.