Calendar Papers and Code

Line Drawing and Leap Years
By Mitchell A. Harris and Edward M. Reingold.
ACM Computing Surveys 36 (2004), 68-80.

Bresenham's algorithm minimizes error in drawing lines on integer grid points; leap year calculations, surprisingly, are a generalization. We compare the two calculations, and show how to compute directly, without iteration, individual points of a Bresenham line. We also discuss an unexpected connection of the leap year/line pattern with Euclid's algorithm for computing the greatest common divisor. (PDF; 13 pages)

Hebrew Dating
By Nachum Dershowitz and Edward M. Reingold.
The 24th IAJGS International Conference on Jewish Genealogy, Jerusalem, July 4-9, 2004.

Paper (11 pages): Word or PDF
Slides (40 pages): PowerPoint or PDF (loses overlay structure)

Indian Calendrical Calculations
By Nachum Dershowitz and Edward M. Reingold.
Ancient Indian Leaps in the Advent of Mathematics edited by B. S. Yadav (2010).

We analyze various Indian calendars. We discuss the Indian day count, a generic solar calendar that generalizes various calendars including the mean Indian solar calendar, the true and astronomical Indian solar calendars, a generic lunisolar calendar that generalizes the Indian version, and the true and astronomical Indian lunisolar calendars. We also discuss aspects of the traditional Indian calculation of the time of sunrise and the determination of lunisolar holidays. (PDF; 25 pages)

The following material is now way out of date, having been superceded by Calendrical Calculations: The Millennium Edition.

Implementing Solar Astronomical Calendars
By Nachum Dershowitz and Edward M. Reingold.
Birashkname (Musa Akrami, editor), University of Shahid Beheshti, 1998.

In this note we describe a unified implementation of calendars whose year is based on the astronomical solar cycle--that is, on the precise solar longitude at a specified time. For example, the astronomical Persian calendar begins its new year on the day when the vernal equinox (approximately March 21) occurs before apparent noon (the middle point of the day, not clock time) and is postponed to the next day if the equinox is after apparent noon. Other calendars of this type include the French Revolutionary calendar and the future form of the Bahai calendar. Our approach also offers a slight simplification to the implementation of the Chinese lunisolar calendar. (PostScript; 7 pages)

Calendrical Calculations
By Nachum Dershowitz and Edward M. Reingold.
Software-Practice and Experience 20 (1990), 899-928.

A unified, algorithmic presentation is given for the Gregorian (current civil), ISO, Julian (old civil), Islamic (Moslem), and Hebrew (Jewish) calendars. Easy conversion among these calendars is a byproduct of the approach, as is the determination of secular and religious holidays. (PostScript; 30 pages)

Calendrical Calculations, II: Three Historical Calendars
By Edward M. Reingold, Nachum Dershowitz, and Stewart M. Clamen.
Software-Practice and Experience 23 (1993), 383-404.

Algorithmic presentations are given for three calendars of historical interest, the Mayan, French Revolutionary, and Old Hindu. (PostScript; 22 pages)

Common Lisp code from above calendar papers

C++ code for most of the Lisp code in the first paper

The GNU Emacs Implementation of the Calendar

This page has been visited 20845 times.
Last modified: Sunday, 05-Jun-2011 19:02:34 CDT