On a whim, I decided to try to figure out how to create my own Linux command line Mayan countdown to December 21.

With the "knowledge" that the supposed doomsday is 13.0.0.0.0 according to the Mayan long count and that the date for that is approximated to Dec.21, I wrote a bash script to countdown the last 2 digits to 0.0.0.0.0. For instance, today is 76 days until Dec.21. By my bash script, that comes out to 3 winal and 16 K'in. Or, in other words,

0.0.0.3.16

Tomorrow will be...

0.0.0.3.15

We're already close enough to set the date that Tun, K'utun and Bac'tun are all zero. No point in calculating them. To make a short complicated story shorter, here's my script.

Code:
#!/bin/bash
let countdn=15695-$(date +%s)/86400
let winal=$countdn/20
let kin=$countdn-$winal*20
echo "0.0.0."$winal"."$kin
There are 20 K'in (days) in a Winal, so the day after 0.0.0.3.0 will be 0.0.0.2.19 left.

I guess I should put an 'if' statement on 'countdn' to make sure it's not a negative number.

else
echo "The sky is falling!"