Calendars, lots of calendars

I'm happy to see that, by today, I know enough Python to be able to work on a TDD loop: write a failing test, write the code to make it green, refactor and cleanup. Protip: use py.test as the test runner, and mock all the things! No wonder the mock library got added to the Python Standard Library in Python 3: it really feels magical sometimes.

While checking how to use dates in Python, I ran into a reference to Dershowitz and Reingold’s book Calendrical Calculations. This book seems to be the reference material for working with dates in computer science, and raised my attention for two reasons: 
  1. It supplies its algorithms in Lisp, and
  2. It is detailed to the point of supplying conversion details for "Korean, Vietnamese, Aztec, and Tibetan calendars". Talk about internationalisation.
One of the two calendars used by the Aztecs has 260 days, each of them named by a combination of a number from 1 to 13 and a day sign, which is one of these 20:


Much, much cooler than our Gregorian calendar. 

See you tomorrow, 7 Ocelotl, a Jaguar day.