And speaking of leap years...

There's another connection between the number 13 and leap years. Many ancient calendars that attempted to combine lunar and solar calendars required 13 months. Often, this was a intercalary, or leap month that did not occur every year. Without such a leap month, calendars would gradually fall out of sync with the seasons. 

One calendar that famously suffered from this issue was the Mayan solar calendar. This calendar consisted of 18 months of 20 days each, plus five extra days, making it a 365 day calendar, with no leap day or leap month. You may be thinking, 'Hey, I know that!' because you've seen a quote that was popping up on Facebook and social media in the last couple months:

There have been about 514 Leap Years since Caesar created it in 45 B.C.. Without the extra day every 4 years, today would be around July 28, 2013.

Also, the Mayan calendar did not account for leap year... so technically the world should have ended 7 months ago.

This amusing little factoid is quite false. The Mayans had three different calendars: their solar calendar, which was subject to shifting against the seasons as a result of the lack of a leap day; a religious calendar that had years of 260 days; and a long-count calendar, that was a purely mathematical counting system. This last counting system - not the solar calendar - is the one that purportedly calculates December 21st as being the end of the world. 

This might be a good place to say to yourself, "huh, that's interesting," and stop reading. Because to go into detail about this long-count calendar requires a little bit of math, and the only reward I can promise you is a couple more interesting occurances of the number 13. Although you'll no doubt be hearing a lot more about the Mayan calendar as we draw close to December 21st, so you might as well hear it now. 

In the western world, we almost universally use a base 10 counting system. That means our system of digits is based around multiple of 10: 100, 1,000, 10,000 etc. The Mayans used a base 20 counting system, meaning that their digits were based around the numbers of 20, 400, 8,000, 160,000, etc. However, for tracking dates, they used a modified base counting system where the second unit went to 18. In the same way that we have 365 days in a year, 10 years in a decade, 10 decades in a century, and 10 centuries in a millenium, the Mayans had 20 days in a uinal, 18 uinal in a tun, 20 tun in a kactun, 20 kactun in a bactun, and 20 bactun in a pictun. (It goes on for several more units, but those are irrelevant to the discussion.)

When you multiply it all out, a bactun is equivelent to roughly 394 years. We are approaching the end of the 13th bactun (see, I told you we'd get back to 13), since the Mayan mythological creation date. Leap years have no impact on this counting system, because it's simply math. 

Here's a handy site you can use to calculate dates on a wide range of calendars, both ancient and modern, but this representation of the different mayan calendar is beautiful to watch.

Of course, there's little or nothing to suggest that the Mayans thought that the end of a bactun had any sort of cosmic significance. However, it's a more commonly cited idea that the Mayans believed that the universe was destroyed and recreated at the end of every pictun. The current pictun ends on Thursday, October 12, 4772. So it's nothing we'll need to worry about. However, the mathematically paranoid would note that this means that this means the next universe will begin on a Friday the 13th.