What’s today’s Mayan Long Count date?
I wanted to know.
I read up on the Mayan calendar.
It was easy to code up in Python:
[sourcecode lang=”python”]
#!/usr/bin/env python
# This code is completely untested, it doesn’t do anything relative
# to timezones or the like. It does appear to broadly function.
# 1 k’in == 1 day
# 1 winal = 20 k’in or 20 days
# 1 tun = 18 winal or 360 days
# 1 k’atun = 20 tun or 7200 days
# 1 b’ak’tun = 20 k’atun or 144000 days
import time
from datetime import date
def calc(n):
# n is the days since the start of the latest b’ak’tun
# which occurred on September 18, 1618
baktun = int(n / 144000)
n = n – baktun * 144000
katun = int(n / 7200)
n = n – katun * 7200
tun = int(n / 360)
n = n – tun * 360
winal = n / 20
n = n – winal * 20
kin = n
return map(lambda x : str(x), [12+baktun, katun, tun, winal, kin])
today = date.today()
s = date(1618, 9, 18)
print "Mayan Long Count = %s" % (‘.’.join(calc(int((today – s).days))))
[/sourcecode]
Today is 12.19.19.17.13. In 7 days, the right most place will roll over, and the date will be 13.0.0.0.0, starting a new b’ak’tun.
Or the world will end. Enjoy!