Calendrical Calculations

Calendrical Calculations is a book on calendar systems and algorithms for computers to convert between them. It was written by computer scientists Nachum Dershowitz and Edward Reingold and published in 1997 by the Cambridge University Press. A second "millennium" edition with a CD-ROM of software was published in 2001, a third edition in 2008, and a fourth "ultimate" edition in 2018.

Topics
There have been many different calendars in different societies, and there is much difficulty in converting between them, largely because of the impossibility of reconciling the irrational ratios of the daily, monthly, and yearly astronomical cycle lengths using integers. The 14 calendars discussed in the first edition of the book included the Gregorian calendar, ISO week date, Julian calendar, Coptic calendar, Ethiopian calendar, Islamic calendar, modern Iranian calendar, Baháʼí calendar, French Republican calendar, old and modern Hindu calendars, Maya calendar, and modern Chinese calendar. Later editions expanded it to many more calendars. They are divided into two groups: "arithmetical" calendars, whose calculations can be performed purely mathematically, independently from the positions of the moon and sun, and "astronomical" calendars, based in part on those positions.

The authors design individual calendrical calculation algorithms for converting each of these calendars to and from a common format, the Rata Die system of days numbered from January 1 of the (fictional) Gregorian year 1. Combining these methods allows the conversion between any two of the calendars. One of the innovations of the book is the use of clever coding to replace tables of values of mildly-irregular sequences, such as the numbers of days in a month. The authors also discuss the history of the calendars they describe, analyze their accuracy with respect to the astronomical events that they were designed to model, and point out important days in the year of each calendar. An appendix includes full documentation of the software.

One purpose of the book is to provide usable and efficient open software in an area where previous solutions were largely proprietary, incomplete, and buggy. Author Edward Reingold originally programmed these methods in Emacs Lisp, as part of the text editor GNU Emacs, and the authors expanded an earlier journal publication on this implementation into the book. This code has been converted to Common Lisp for the book, and distributed under an open license, and included within the book as a precise and unambiguous way of describing each algorithm.

Audience and reception
This is primarily a reference book, but can also be read for pleasure by readers interested in this topic. Reviewer Victor J. Katz recommends this book to anyone who is "at all interested in how we deal with time". However, reviewer John D. Cook points out that, to understand the details of the algorithms described in the book, readers must be familiar with Lisp coding, and that it is difficult to skim without working through the details. On the other hand, despite not being easy reading, reviewer Antonio F. Rañada recommends it not only to "mathematicians, astronomers or computer scientists, but also for historians or for any person interested in the cultural aspects of science".

Reviewer Noel Swerdlow views the first edition as a "work in progress", preferring the 19th-century tables of Robert Schram to computerized methods. And while praising it for avoiding the "second-hand errors, third-order simplifications, and outright myths" of many other millennial works on the calendar, reviewer Robert Poole points out as a weakness that it only considers a single version of each calendar, whereas historically these systems went through multiple revisions, and quotes the book as noting that its results are sometimes "mathematically sensible, but culturally wrong". Adding that the reduction of a human-produced calendar to a computer calculation is "sheer hubris", he nevertheless concludes that "We can be grateful that so useful a work of reference has been created from a project of such awe-inspiring futility". And reviewer Manfred Kudlek calls this "the most extensive and detailed publication on calendar systems" since the early 20th-century Handbuch der mathematischen und technischen Chronologie of Friedrich Karl Ginzel.