Codebox Software

Lunar Calendar Generator

Published: 03 Mar 2018

This Python utility will generate an HTML Lunar Calendar for the year that you specify. To run the utility, pass the year as a command-line argument - for example:

python main.py 2018

When running the utility, the file template.html must be present in the current working directory.

An example calendar is shown below:

Lunar Calendar for 2018
A Lunar Calendar for the year 2018 (original HTML file)

As well as displaying the phase of the moon for each day of the year, the calendar lists the exact dates and times of each full moon and new moon, highlighting any blue moons or black moons that occur.

The source code is released under the MIT open source license and is available on GitHub.