Phases of the Moon

This group of pages has my contributions to the Internet community.

This program shows the phase of the moon in any of a variety of formats and for any of a variety of times.

By default, it uses the current time. However, you may specify an alternate date or hour.

This program was originally written in PL/1 at the M.I.T. Architecture Machine Group. It was translated to Fortran, then to C by Brian Hess. It was rewritten several times by Craig A. Finseth. All of this work was done on the premise that a computer's bugs can not appear properly unless they have access to "correct" information about the phase of the moon.

The algorithm is a first-order approximation to the correct phase of the moon calculation. (The full, "correct" one that has upwards of 30 sin terms). The base time is 10:21am 1/12/75 (GMT) and times before that do not work. (And, true to its nature, the program does not check for attempts to use such times.) A lunar cycle is assumed to be 42,532 minutes long. This algorithm is known to be incorrect. It, however, is retained in honor of the spirit of the original implementation (the approximation is the only thing left: even the time constants have been refined).

This version is written in JavaScript. As you might expect from the previous statement, you really need to have JavaScript or ECMAscript enabled in your browser for this page to be useful.

Another version can be found in the Freyja distribution and in the Gadget software (in Calendar).


year       month       day       hour       min       sec
bright characters on dark background
fill the phase picture background
describe as for Southern Hemisphere
set time zone offset
long form
ISO form
phase form
short form

Creative Contributions

Others' Contributions


Internet FAQs






I am Craig A. Finseth.

Back to Home.

Back to top.

Last modified Tuesday, 2010-03-02T20:28:12-06:00.