A fairly straightforward port of the Python calendar package.