Last Modified: August 5, 1998
The information contained in the sections listed below is a guide to computer programmers interested in implementing date algorithms in a variety of languages and on a wide range of hardware platforms. Although all rights are reserved under the copyright laws, programmers may implement the algorithms without permission. However, I would ask that if this is done for any of the algorithms that are not known to be fully documented elsewhere, a reference be made to this document. Doing so will assure full and consistent documentation, minimize the propagation of any errors that might be discovered, and provide a central location for any improvements that are made in the future.
Various calendar dates (Julian, Gregorian, and Rata Die) are used and produced by the algorithms that are presented but no attempt has been made to account for various problems associated with the general use of historical dates. For example, 90 days were inserted into the calendar by Julius Caesar in -45 and following Caesar's death, the leap year rule was misapplied until corrected by Emperor Augustus who omitted leap years from years -8 through +4. Various locations used different calendars throughout the Middle Ages and even within one locality, different calendars were often used for dating ecclesiastical records, fiscal transactions, and personal correspondence. None of these complications are accounted for by these algorithms. The following is assumed: