An Almanac Module for drupal

Tagged:  

Updated 27 April 2010. details below.

An almanac providing basic sun and moon data can be a useful addition to sites that include astronomy, religious, education, energy-related, weather, or astrology information. Sites devoted to a range of outdoor activities, from night photography to fishing, can also benefit from adding an almanac.

PHP V5 includes sunrise and sunset functions to make the job of adding sunrise/sunset data easier. However, calculating the time of the rising and setting of the moon is more complex. The problems of calculating moonrise and moonset for a location - such as parallax, refraction, and accounting for days when there is either no moonrise or moonset - have been given exhaustive treatment elsewhere (just do a Google search on moonrise calculations.)

A relatively easy, low resolution method for calculating moonrise and moonset was outlined in Montenbruck and Pfleger's Astronomy on the Personal Computer (1989). The algorithm has been implemented in multiple programs. The almanac module includes the first "drupal-ized" version of the algorithm, and can be used as a replacement for RSS feeds that include this data.

You can view the output of the module here. The settings are straightforward. This code is released under a GPL license.

The Date API module is required.

You can see sample output and read more about the module on the almanac page.

27 April 2010 Update: You can download the module from the module page on the drupal site: http://drupal.org/project/almanac.