Moon This is a collection of functions to calculate the phases of the moon and several astronomical and calendrical data connected to the sun and the moon. Additional to this there is the Delphi component TMoon which shows the phase of the moon at a given date.

The component works with Delphi 1 to 6, and probably also the various C++ Builder versions (I cannot check that one as I don't speak C++), and the algorithm part should also work with Kylix. It includes full source code, a complete help file, and it is postcard freeware.
Download TMoon (Zipped archive, 237kB)
It includes the source code for a demo application, a clone of the Moontool - originally a X11 unix software, which was ported to Windows by John Walker, and my version adds lots of features over the original one. This application can of course also work without Delphi or TMoon, so here's a complete installation for it.
Download Moontool installer (Zipped archive, 925kB)

Astronomical Algorithms by Jean Meeus
2nd edition (December 1998), Willmann-Bell, ISBN 0943396611
The source for most of the algorithms I used. This book contains a lot of algorithms for many astronomical calculations. However don't expect the full astronomical theory (otherwise the book would need thousands of pages), many of the algorithms are number crunching polynomial terms, so the description is focusing on how to implement that algorithm.
Amazon does not have this book anymore, but you can still get this book directly at the publisher Willman-Bell. The two books Mathematical Astronomy Morsels and More Mathematical Astronomy Morsels are a kind of appendix to this book, they present many fascinating or peculiar results from the algorithms, for example that April 19th is the most common date for Easter.
Astronomy on the Personal Computer by Oliver Montenbruck and Thomas Pfleger
4th rev. edition (May 2000), Springer, ISBN 3540672214
An alternative book on astronomical algorithms for the PC. It's only half the size of the Meeus book, thus it covers much less topics, but of the course the most important ones like moon, sun and planets as well as eclipse are covered. For these calculations much less of the pertubative terms are listed, thus the accuracy is less the those of Meeus - on the other hand the descriptions are a bit more elaborate. See also the publisher's webpage on this book.
Explanatory Supplement to the Astronomical Almanac by Kenneth Seidelmann
Rev. Edition (1992), University Science Books, ISBN 0935702687
While the first two books are only covering the algorithms to calculate many astronomical data, this book contains the theory behind them. Starting with the different time frames, coordinate systems, various calendars, but also the geometrical details of calculation solar and lunar eclipses. However the quite high price makes it worth only for those who did not get enough by the previous two books, especially those who want to know why the algorithms are the way they are. Chapter 12 about calendars is also available online (however with some omissions).
Calendrical Calculations - The Millennium Edition by Edward M. Reingold, Nachum Dershowitz
Revised edition (2001), Cambridge University Press, ISBN 0521777526
This book is a real science book covering all the mathematical-algorithmical aspects of calendars, their conversions, their structure. Being focused on this mathematical aspect the cultural or historical are mostly left out. So this book is the definite resource of calendarical algorithms, however it's definitely no introductory book or a popular science book (see below for that kind of books), but a real scientific math book.
The authors have their own website.
Standard C Date/Time Library by Lance Latham
May 1998, CMP Books, ISBN 0879304960
While the previous book focuses on the mathematical side, this one is focused on the actual programming side of calendarical algorithms. It covers all important present and historic calendars including a proposed calendar of Mars - and it also has reasonably more information on the historic and cultural background, but that also makes it twice a much volume as the previous book.
Understanding the Jewish Calendar by Nathan Bushwick
February 1989, Moznaim Pub Corp, ISBN 0940118173
This book is a complete description of the jewish (hebrew) calendar, however it is focused for a reader with a background in jewish culture, but no knowledge on calendarical things. The first third of the book covers the astronomical basics of calendars - day, lunar month, solar year - and the other part introduces the jewish calendar step by step. But as this is done using many technical terms like the jewish holidays without further explanation (which of course a jew wouldn't need) it's somewhat hard to read.
Mapping Time by E.G. Richards
May 2000, Oxford Univ Press, ISBN 0192862057
The previous books were more focused on the technical aspects, the following ones are more popular science books about the history of the calendar, however this book is a fine mixture of both. It first introduces into the astronomical basics of calendars, then it does a kind of world trip to introduce many different calendars from all parts of the world and also from history, and finally it gives some algorithms on how to convert between some of them.
Marking Time by Duncan Steel
1 edition (December 8, 2000), John Wiley & Sons, ISBN 0471404217
A popular science description of the history of the christian calendar, from the calendar reforms of Julius Caesar, the various Easter definitions and their solution, the gregorian calendar reform, proposed but never realized further reforms. Also some calendars from other cultures are shortly mentioned, as well as an appendix giving the astronomical detailed definition of day, month and year.
Calendar by David Ewing Duncan
1 edition (November 9, 1999), Bard Books, ISBN 0380793245
Another popular science book about the history of the western calendar. It's very similar to the previous book, this one focusing a little bit more on the historic and scientific developements leading to the calendar reform of 1582, thus this part is more detailled then in the previous book.


Bugs of V2.0

Bugs of V1.2

History of TMoon This list shows the changes between the versions, some were nearly only bug fixes, some had a lot of new features. For those with historical interest you can also find the old archives.
1997-04-031.0 first published version, collection of functions and a TImage-like component which shows the phase at a given date
Moontool clone as a demo application
1997-05-211.1 setting Align to anything else then alNone cause wild flickers, fixed
made the demo application runnable in 16 bit, too
small bug in demo application with daylight saving fixed
1997-12-071.2 added calculation of seasons, moon/sunrise and -set, perigee and apogee and eclipses
new icon property, 16x16 bitmap
second page in Moontool with the new additional data
2001-07-072.0 Rotation of the moon image
"Color" bitmaps
New functions for horizontal coordinates of sun and moon, Perihel and Aphel
Twilight (civil, nautical, astronomical)
Easter date for gregorian and julian calendary
Pesach date and jewish calendar functions
Chinese calendar
Corrected TDateTime functions
Location database in Moontool
Moontool set date/time dialog
Online help

Last changed 2002-09-25