CALENDRICAL CALCULATIONS,Third Editionassets.cambridge.org/97805217/02386/frontmatter/... ·...

28
CALENDRICAL CALCULATIONS, Third Edition This new edition of the popular calendar book expands the treatment of the previous edition to new calendar variants: generic cyclical calendars and astronomical lunar calendars, as well as the Korean, Vietnamese, Aztec, and Tibetan calendars. As interest grows in the impact of seemingly arbitrary calendrical systems upon our daily lives, this book frames the calendars of the world in a completely algorithmic form. Easy conversion among these calendars is a by- product of the approach, as is the determination of secular and religious holidays. Calendrical Calculations makes accurate calendrical algorithms readily available. This book is a valuable resource for working programmers, as well as a fount of useful algorithmic tools for computer scientists. In addition, the lay reader will find the historical setting and general calendar descriptions of great interest. Beyond his expertise in calendars, Nachum Dershowitz is a leading figure in software verification in general and termina- tion of programs in particular; he is an international authority on equational inference and term rewriting. Other areas in which he has made major contributions include program semantics and combinatorial enumeration. Dershowitz has authored or coauthored more than 100 research papers and several books and has held visiting positions at prominent institutions around the globe. He has won numerous awards for his research and teaching. He was born in 1951, and his graduate degrees in applied mathematics are from the Weizmann Institute in Israel. He is currently a professor of computer science at Tel Aviv University. Edward M. Reingold was born in Chicago, Illinois, in 1945. He has an undergraduate degree in mathematics from the Illinois Institute of Technology and a doctorate in computer science from Cornell University. Reingold was a faculty member in the Department of Computer Science at the University of Illinois at Urbana-Champaign from 1970–2000; he retired as a Professor Emeritus of Computer Science in December 2000 and moved to the Department of Computer Science at the Illinois Institute of Technology as professor and chair, an administrative post he held until 2006. His re- search interests are in theoretical computer science—especially the design and analysis of algorithms and data structures. A Fellow of the Association for Computing Machinery since 1995, Reingold has authored or coauthored more than 70 re- search papers and 10 books; his papers on backtrack search, generation of combinations, weight-balanced binary trees, and drawing of trees and graphs are considered classics. He has won awards for his undergraduate and graduate teaching. Reingold is intensely interested in calendars and their computer implementation; in addition to Calendrical Calculations and Calendrical Tabulations, he is the author and former maintainer of the calendar/diary part of GNU Emacs. © Cambridge University Press www.cambridge.org Cambridge University Press 978-0-521-70238-6 - Calendrical Calculations, Third Edition Nachum Dershowitz and Edward M. Reingold Frontmatter More information

Transcript of CALENDRICAL CALCULATIONS,Third Editionassets.cambridge.org/97805217/02386/frontmatter/... ·...

CALENDRICAL CALCULATIONS, Third Edition

This new edition of the popular calendar book expands the treatment of the previous editionto new calendar variants: generic cyclical calendars and astronomical lunar calendars, as wellas the Korean, Vietnamese, Aztec, and Tibetan calendars. As interest grows in the impact ofseemingly arbitrary calendrical systems upon our daily lives, this book frames the calendarsof the world in a completely algorithmic form. Easy conversion among these calendars is a by-product of the approach, as is the determination of secular and religious holidays. CalendricalCalculations makes accurate calendrical algorithms readily available.

This book is a valuable resource for working programmers, as well as a fount of usefulalgorithmic tools for computer scientists. In addition, the lay reader will find the historicalsetting and general calendar descriptions of great interest.

Beyond his expertise in calendars, Nachum Dershowitz is aleading figure in software verification in general and termina-tion of programs in particular; he is an international authorityon equational inference and term rewriting. Other areas inwhich he has made major contributions include programsemantics and combinatorial enumeration. Dershowitz hasauthored or coauthored more than 100 research papers andseveral books and has held visiting positions at prominentinstitutions around the globe. He has won numerous awards forhis research and teaching. He was born in 1951, and his graduatedegrees in applied mathematics are from the Weizmann Institute in Israel. He is currently aprofessor of computer science at Tel Aviv University.

Edward M. Reingold was born in Chicago, Illinois, in 1945.He has an undergraduate degree in mathematics from theIllinois Institute of Technology and a doctorate in computerscience from Cornell University. Reingold was a facultymember in the Department of Computer Science at theUniversity of Illinois at Urbana-Champaign from 1970–2000;he retired as a Professor Emeritus of Computer Science inDecember 2000 and moved to the Department of ComputerScience at the Illinois Institute of Technology as professorand chair, an administrative post he held until 2006. His re-search interests are in theoretical computer science—especiallythe design and analysis of algorithms and data structures. A Fellow of the Association forComputing Machinery since 1995, Reingold has authored or coauthored more than 70 re-search papers and 10 books; his papers on backtrack search, generation of combinations,weight-balanced binary trees, and drawing of trees and graphs are considered classics. Hehas won awards for his undergraduate and graduate teaching. Reingold is intensely interestedin calendars and their computer implementation; in addition to Calendrical Calculations andCalendrical Tabulations, he is the author and former maintainer of the calendar/diary part ofGNU Emacs.

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Calendrical Calculations

THIRD EDITION

NACHUM DERSHOWITZTev Aviv University

EDWARD M. REINGOLDIllinois Institute of Technology

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

CAMBRIDGE UNIVERSITY PRESSCambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paolo, Delhi

Cambridge University Press32 Avenue of the Americas, New York, NY 10013-2473, USA

www.cambridge.orgInformation on this title: www.cambridge.org/9780521885409

© Cambridge University Press 2008

This publication is in copyright. Subject to statutory exception andto the provisions of relevant collective licensing agreements,no reproduction of any part may take place without the writtenpermission of Cambridge University Press.

First published 2008

Printed in the United States of America

A catalog record for this publication is available from the British Library.

Library of Congress Cataloging in Publication Data

Dershowitz, Nachum.Calendrical calculations / Nachum Dershowitz, Edward M. Reingold. – 3rd ed.

p. cm.Rev. ed. of: Calendrical calculations / Edward M. Reingold, Nachum Dershowitz. Millennium ed.Includes bibliographical references and index.ISBN 978-0-521-88540-9 (hardback) – ISBN 978-0-521-70238-6 (pbk.)1. Calendar – Mathematics. I. Reingold, Edward M., 1945– II. Reingold, Edward M., 1945–Calendrical calculations. III. Title.CE12.D473 2007529’.3–dc22 2007024347

ISBN 978-0-521-88540-9 hardbackISBN 978-0-521-70238-6 paperback

Cambridge University Press has no responsibility forthe persistence or accuracy of URLs for external orthird-party Internet Web sites referred to in this publicationand does not guarantee that any content on suchWeb sites is, or will remain, accurate or appropriate.

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

���� ��������� ���� �� �� ��� �

���� ���� ���

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Contents

List of Frontispieces page xii

List of Figures xiii

List of Tables xiv

Abbreviations xv

Mathematical Notations xvi

Preface xix

Credits xxvii

License and Limited Warranty and Remedy xxviii

1 Calendar Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1 Calendar Units and Taxonomy 41.2 Fixed Day Numbers 91.3 Negative Years 121.4 Epochs 141.5 Julian Day Numbers 161.6 Mathematical Notation 171.7 Search 201.8 Dates and Lists 221.9 A Simple Calendar 241.10 Cycles of Days 271.11 Simultaneous Cycles 301.12 Cycles of Years 321.13 Warnings about the Calculations 39References 41

I ARITHMETICAL CALENDARS

2 The Gregorian Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . 452.1 Structure 452.2 Implementation 48

vii

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

viii Contents

2.3 Alternative Formulas 522.4 The Zeller Congruence 562.5 Holidays 57References 60

3 The Julian Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633.1 Structure and Implementation 633.2 Roman Nomenclature 653.3 Roman Years 693.4 Holidays 70References 71

4 The Coptic and Ethiopic Calendars . . . . . . . . . . . . . . . . . . . . 734.1 The Coptic Calendar 734.2 The Ethiopic Calendar 754.3 Holidays 76References 77

5 The ISO Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Reference 81

6 The Islamic Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836.1 Structure and Implementation 836.2 Holidays 86References 87

7 The Hebrew Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . 897.1 Structure and History 907.2 Implementation 957.3 Holidays and Fast Days 1017.4 Personal Days 1057.5 Possible Days of Week 108References 110

8 The Ecclesiastical Calendars . . . . . . . . . . . . . . . . . . . . . . . 1138.1 Orthodox Easter 1148.2 Gregorian Easter 1168.3 Astronomical Easter 1198.4 Movable Christian Holidays 119References 121

9 The Old Hindu Calendars . . . . . . . . . . . . . . . . . . . . . . . . 1239.1 Structure and History 1239.2 The Solar Calendar 1269.3 The Lunisolar Calendar 128References 134

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Contents ix

10 The Mayan Calendars . . . . . . . . . . . . . . . . . . . . . . . . . . 13710.1 The Long Count 13810.2 The Haab and Tzolkin Calendars 13910.3 The Aztec Calendars 145References 150

11 The Balinese Pawukon Calendar . . . . . . . . . . . . . . . . . . . . 15311.1 Structure and Implementation 15311.2 Conjunction Days 159References 161

12 Generic Cyclical Calendars . . . . . . . . . . . . . . . . . . . . . . . 16312.1 Single Cycle Calendars 16312.2 Double Cycle Calendars 16612.3 Summary 168

II ASTRONOMICAL CALENDARS

13 Time and Astronomy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17113.1 Position 17213.2 Time 17413.3 The Day 17913.4 The Year 18513.5 Astronomical Solar Calendars 19213.6 The Month 19313.7 Times of Day 207References 214

14 The Persian Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21714.1 Structure 21714.2 The Astronomical Calendar 21914.3 The Arithmetic Calendar 22114.4 Holidays 226References 227

15 The Baha’ı Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . 22915.1 Structure 22915.2 Western Version 23115.3 The Future Baha’ı Calendar 23315.4 Holidays 236References 237

16 The French Revolutionary Calendar . . . . . . . . . . . . . . . . . . 23916.1 The Original Form 24116.2 The Modified Arithmetical Form 242References 244

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

x Contents

17 The Chinese Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . 24717.1 Solar Terms 24817.2 Months 25117.3 Conversions to and from Fixed Dates 25817.4 The Sexagesimal Cycle of Names 26017.5 Common Misconceptions 26317.6 Holidays 26417.7 Chinese Age 26617.8 Chinese Marriage Auguries 26717.9 The Japanese Calendar 26817.10 The Korean Calendar 26917.11 The Vietnamese Calendar 271References 272

18 The Modern Hindu Calendars . . . . . . . . . . . . . . . . . . . . . . 27518.1 Hindu Astronomy 28118.2 Calendars 28718.3 Sunrise 29218.4 Alternatives 29518.5 Astronomical Versions 29918.6 Holidays 303References 312

19 The Tibetan Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . 31519.1 Calendar 31519.2 Holidays 319References 322

20 Astronomical Lunar Calendars . . . . . . . . . . . . . . . . . . . . . 32520.1 Astronomical Easter 32520.2 Lunar Crescent Visibility 32620.3 The Observational Islamic Calendar 32820.4 The Classical Hebrew Calendar 329References 331

Coda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

III APPENDICES

A Function, Parameter, and Constant Types . . . . . . . . . . . . . . . 337A.1 Types 337A.2 Function Types 342A.3 Constant Types and Values 356

B Lisp Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . 361B.1 Lisp Preliminaries 361

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Contents xi

B.2 Basic Code 364B.3 The Egyptian/Armenian Calendars 366B.4 Cycles of Days 367B.5 The Gregorian Calendar 367B.6 The Julian Calendar 372B.7 The Coptic and Ethiopic Calendars 375B.8 The ISO Calendar 376B.9 The Islamic Calendar 377B.10 The Hebrew Calendar 378B.11 The Ecclesiastical Calendars 385B.12 The Old Hindu Calendars 386B.13 The Mayan Calendars 388B.14 The Balinese Pawukon Calendar 392B.15 Time and Astronomy 395B.16 The Persian Calendar 411B.17 The Baha’ı Calendar 413B.18 The French Revolutionary Calendar 416B.19 The Chinese Calendar 417B.20 The Modern Hindu Calendars 424B.21 The Tibetan Calendar 435B.22 Astronomical Lunar Calendars 437Reference 439

C Sample Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441References 447

Index 449

Envoi 477

About the Cover 479

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

List of Frontispieces

Page from a 1998 Iranian synagogue calendar page xviiiTwo pages of Scaliger’s De Emendatione Temporum 0Swedish almanac for February, 1712 44Profile of Julius Cæsar 62Calendar monument at Medinet Habu, Thebes 72Banker’s calendar from 1881 78Illustration of Mohammed instituting the lunar calendar 82Sixteenth-century Hebrew astrolabe 88Finger calculation for the date of Easter 112Stone astrolabe from India 122Mayan New Year ceremonies 136Balinese plintangen 152Painting of Joseph Scaliger 162Kepler’s mystical harmony of the spheres 170Arabian lunar stations 216Shrine of the Bab on Mount Carmel 228Vendemiaire by Laurent Guyot 238The 12 traditional Chinese calendrical animals 246Stone slab from Andhra Pradesh with signs of the zodiac 274Tibetan calendar carving 314Equation of time wrapped onto a cylinder 324Blue and white glazed jar from the reign of Kang Xı 332Page from a 1911 Turkish calendar 336Astronomical clock 360Japanese calendar chart dials 440First page of the index to Scaliger’s De Emendatione Temporum 448

xii

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

List of Figures

1.1 Meaning of “day” in various calendars page 132.1 A corrective term in the Gregorian calendar calculation 547.1 Molad of Nisan versus the actual moment of the new moon 968.1 Distribution of Gregorian Easter dates 1189.1 Old Hindu lunisolar calendar 130

10.1 Haab month signs 14110.2 Tzolkin name signs 14313.1 Standard time zones of the world as of 2006 17613.2 DT − UT for −500–1600 18013.3 DT − UT for 1600–2012 18113.4 Equation of time 18313.5 Length of year 18813.6 Length of synodic month 19417.1 Possible numberings of the months on the Chinese calendar 25417.2 Hypothetical Chinese year 25617.3 Distribution of Chinese New Year dates 26518.1 Modern Hindu lunisolar calendar 28018.2 Hindu calculation of longitude 283

xiii

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

List of Tables

Abbreviations page xvMathematical notations xvi1.1 Mean year and month lengths on various calendars 101.2 Epochs for various calendars 151.3 Functions δ(d) for use in formula (1.62) 301.4 Constants describing the leap-year structure of various calendars 333.1 Roman nomenclature 678.1 Comparative dates of Passover and Easter, 9–40 C.E. 1209.1 Samvatsaras 1259.2 Hindu solar (saura) months 127

11.1 Pawukon day names 15411.2 The 210-day Balinese Pawukon calendar 15712.1 Constants for generic arithmetic calendars 16713.1 Arguments for solar-longitude 19013.2 Solar longitudes and dates of equinoxes and solstices 19113.3 Arguments for nth-new-moon 19713.4 Arguments for nth-new-moon 19813.5 Arguments for lunar-longitude 20013.6 Arguments for lunar-latitude 20413.7 Arguments for lunar-distance 20613.8 Significance of various solar depression angles 21214.1 Astronomical versus arithmetic Persian calendars, 1000–1800 A.P. 22517.1 Solar terms of the Chinese year 24918.1 Suggested correspondence of lunar stations and asterisms 27918.2 Hindu sine table 28418.3 The cycle of karan. as 310Sample data 441

xiv

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Abbreviations

Abbreviation Meaning Explanation

a.d. Ante Diem Prior dayA.D. Anno Domini (= C.E.) In the year of the LordA.H. Anno Hegiræ In the year of Mohammed’s emigration to

Medinaa.m. Ante meridiem Before noonA.M. Anno Mundi In the year of the world since creation

Anno Martyrum Era of the MartyrsA.P. Anno Persico

Anno PersarumPersian year

A.U.C. Ab Urbe Condita From the founding of the city of RomeB.C. Before Christ (= B.C.E.)B.C.E. Before the Common Era (= B.C.)B.E. Bahá’í EraC.E. Common Era (= A.D.)E.E. Ethiopic EraJD Julian Day number Elapsed days since noon on Monday,

January 1, 4713 B.C.E. (Julian); sometimesJ.A.D., Julian Astronomical Day

K.Y. Kali Yuga “Iron Age” epoch of the traditional Hinducalendar

m MetersMJD Modified Julian Day number Julian day number minus 2400000.5S.E. Saka Era Epoch of the modern Hindu calendarp.m. Post meridiem After noonR.D. Rata Die Fixed date—elapsed days since the onset

of Monday, January 1, 1 (Gregorian)U.T. Universal Time Mean solar time at Greenwich, England

(0◦ meridian), reckoned from midnight;sometimes G.M.T., Greenwich Mean Time

V.E. Vikrama Era Alternative epoch of the modern Hinducalendar

xv

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Mathematical Notations

Notation Name Meaning

�x� Floor Largest integer not larger than x�x� Ceiling Smallest integer not smaller than xround(x) Round Nearest integer to x , that is, �x + 0.5�x mod y Remainder x − y�x/y�x amod y Adjusted mod y if x mod y = 0, x mod y otherwisegcd(x, y) Greatest common divisor x if y = 0, gcd(y, x mod y) otherwiselcm(x, y) Least common multiple xy/ gcd(x, y)|x | Absolute value Unsigned value of xsignum(x) Sign −1 when x is negative, +1 when x is

positive, 0 when x is 0i◦j ′k ′′ Angle i degrees, j arc minutes, and k arc

secondsπ Pi Ratio of circumference of circle to

diametersin x Sine Sine of x , given in degreescos x Cosine Cosine of x , given in degreestan x Tangent Tangent of x , given in degreesarcsin x Arc sine Inverse sine of x , in degreesarccos x Arc cosine Inverse cosine of x , in degreesarctan x Arc tangent Inverse tangent of x , in degrees[l, u] Closed interval All real numbers x , l ≤ x ≤ u(l, u) Open interval All real numbers x , l < x < u[l, u) Half-open interval All real numbers x , l ≤ x < u¬p Logical negation True when p is false and vice versap(i)∑

i≥kf (i) Summation The sum of f (i) for all integers i = k,

k + 1, . . . , continuing only as long as thecondition p(i) holds

MAXξ≥µ

{ψ(ξ )} Maximum integer value The largest integer ξ = µ,µ + 1, . . . suchthat ψ(µ), ψ(µ + 1), . . . , ψ(ξ ) are true

MINξ≥µ

{ψ(ξ )} Minimum integer value The smallest integer ξ = µ,µ + 1, . . .

such that ψ(ξ ) is true

xvi

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Mathematical Notations xvii

Notation Name Meaning

p(µ,ν)

MINξ∈[µ,ν]

{ψ(ξ )} Minimum value The value ξ such that ψ is false in [µ, ξ )and is true in [ξ, ν]; see equation (1.30)on page 21 for details

f −1(y, [a, b]) Function inverse Approximate x in [a, b] such thatf (x) = y

f1 f2 f3 · · · Record formation The record containing fields f1, f2, f3, . . .

Rf Field selection Contents of field f of record R〈x0, x1, x2, . . .〉 List formation The list containing x0, x1, x2, . . .

〈 〉 Empty list A list with no elementsL [i] List element The i th element of list L; 0-basedL [i ...] Sublist A list of the i th, (i + 1)st, and so on

elements of list LA||B Concatenation The concatenation of lists A and Bx Vector Indexed list of elements 〈x0, x1, . . .〉{x0, x1, x2, . . .} Set formation The set containing x0, x1, x2, . . .

x ∈ S Set membership The element x is a member of set Sx ∈ Z Integer The number x is an integerA ∩ B Set intersection The intersection of sets A and BA ∪ B Set union The union of sets A and Bh : m : s Time of day h hours, m minutes, and s secondsid jhkmls Duration of time i days, j hours, k minutes, and l secondsbogus Error Invalid calendar date

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Page from an Iranian synagogue calendar for mid-March 1998 showing the Gregorian, Hebrew,Persian, and Islamic calendars.

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Preface

No one has the right to speak in public before he has rehearsed what he wants to saytwo, three, and four times, and learned it; then he may speak. . . . But if a man . . .

puts it down in writing, he should revise it a thousand times, if possible.—Moses Maimonides: The Epistle on Martyrdom (circa 1165)

This book has developed over a 20-year period during which the calendrical algo-rithms and our presentation of them have continually evolved. Our initial motivationwas an effort by one of us (E.M.R.) to create Emacs-Lisp code that would providecalendar and diary features for GNU Emacs [8]; this version of the code includedthe Gregorian, Islamic, and Hebrew calendars (the Hebrew implemented by N.D.).A deluge of inquiries from around the globe soon made it clear to us that there waskeen interest in an explanation that would go beyond the code itself, leading to ourarticle [2] and encouraging us to rewrite the code completely, this time in CommonLisp [9]. The subsequent addition—by popular demand—of the Mayan and FrenchRevolutionary calendars to GNU Emacs prompted a second article [6]. We receivedmany hundreds of reprint requests for these articles. This response far exceeded ourexpectations and provided the impetus to write a book in which we could more fullyaddress the multifaceted subject of calendars and their implementation.

The subject of calendars has always fascinated us with its cultural, historical, andmathematical wealth, and we have occasionally employed calendars as accessibleexamples in introductory programming courses. Once the book’s plan took shape,our curiosity turned into obsession. We began by extending our programs to includeother calendars such as the Chinese, Coptic, modern Hindu, and arithmetic Persian.Then, of course, the code for these newly added calendars needed to be rewritten,in some cases several times, to bring it up to the standards of the earlier mate-rial. We have long lost track of the number of revisions, and, needless to say, wecould undoubtedly devote another decade to polishing what we have, tracking downminutiæ, and implementing and refining additional interesting calendars. As muchas we might be tempted to, circumstances do not allow us to follow Maimonides’dictum quoted above.

In this book we give a unified algorithmic presentation for more than 30 calen-dars of current and historical interest: the Gregorian (current civil), ISO (Interna-tional Organization for Standardization), Egyptian (and nearly identical Armenian),

xix

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

xx Preface

Julian (old civil), Coptic, Ethiopic, Islamic (Moslem) arithmetic and observational,modern Persian (both astronomical and arithmetic forms), Bahá’í (both present andfuture forms), Hebrew (Jewish) standard and observational, Mayan (long count,haab, and tzolkin) and two almost identical Aztec, Balinese Pawukon, French Rev-olutionary (both astronomical and arithmetic forms), Chinese (and nearly identicalJapanese, Korean, and Vietnamese), old Hindu (solar and lunisolar), Hindu (solarand lunisolar), Hindu astronomical, and Tibetan. Easy conversion among these cal-endars is a natural outcome of the approach, as is the determination of secular andreligious holidays.

Our goal in this book is twofold: to give precise descriptions of each calendarand to make accurate calendrical algorithms readily available for computer use. Thecomplete workings of each calendar are described in prose and in mathematical/algorithmic form. Working computer programs are included in an appendix and areavailable on the World Wide Web (see following).

Calendrical problems are notorious for plaguing software, as shown by the fol-lowing examples:

1. Since the early days of computers, when storage was at a premium, program-mers—especially COBOL programmers—usually allocated only two decimaldigits for internal storage of years [4], thus billions of dollars were spent fix-ing untold numbers of programs to prevent their going awry on New Year’s Dayof 2000 by interpreting “00” as 1900 instead of 2000. This became known as the“Y2K problem.”

2. In a Reuters story dated Monday, November 6, 2006, Irene Klotz writes,

A computer problem could force NASA to postpone next month’s launchof shuttle Discovery until 2007 to avoid having the spaceship in orbit whenthe clock strikes midnight on New Year’s Eve. The shuttle is due to take offfrom the Kennedy Space Center in central Florida on December 7 on a 12-day mission to continue construction of the half-built International SpaceStation. But if the launch is delayed for any reason beyond December 17 or18, the flight likely would be postponed until next year, officials at the U.S.space agency said on Monday. To build in added cushion, NASA may moveup the take off to December 6. “The shuttle computers were never envi-sioned to fly through a year-end changeover,” space shuttle program man-ager Wayne Hale told a briefing. After the 2003 accident involving spaceshuttle Columbia, NASA started developing procedures to work around thecomputer glitch. But NASA managers still do not want to launch Discoveryknowing it would be in space when the calendar rolls over to January 1,2007. The problem, according to Hale, is that the shuttle’s computers donot reset to day one, as ground-based systems that support shuttle navi-gation do. Instead, after December 31, the 365th day of the year, shuttlecomputers figure January 1 is just day 366.

3. Many programs err in, or simply ignore, the century rule for leap years on theGregorian calendar (every 4th year is a leap year, except every 100th year, whichis not, except every 400th year, which is):

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Preface xxi

(a) According to the New York Times of March 1, 1997, the New York CityTaxi and Limousine Commission chose March 1, 1996, as the start date fora new, higher fare structure for cabs. Meters programmed by one companyin Queens ignored the leap day and charged customers the higher rate onFebruary 29.

(b) According to the New Zealand Herald of January 8, 1997, a computer soft-ware error at the Tiwai Point aluminum smelter at midnight on New Year’sEve caused more than A$ 1 million of damage. The software error was thefailure to consider 1996 a leap year; the same problem occurred 2 hours laterat Comalco’s Bell Bay smelter in Tasmania (which was 2 hours behind NewZealand). The general manager of operations for New Zealand AluminumSmelters, David Brewer, said, “It was a complicated problem and it tookquite some time to find the cause.”

(c) Early releases of the popular spreadsheet program LotusR 1-2-3R treated 2000as a nonleap year—a problem eventually fixed. However, all releases ofLotusR 1-2-3R take 1900 as a leap year, which is a serious problem with his-torical data; by the time this error was recognized, the company deemed ittoo late to correct: “The decision was made at some point that a change nowwould disrupt formulas which were written to accommodate this anomaly”[10]. ExcelR , part of Microsoft OfficeR , suffers from the same flaw; Mi-crosoft acknowledges this error on its “Help and Support” web site, claim-ing that “the disadvantages of [correcting the problem] outweigh the advan-tages.”

(d) According to Reuters (March 22, 2004), the computer display in the 2004Pontiac Grand Prix shows the wrong day of the week because engineersoverlooked the fact that 2004 is a leap year.

4. The calculation of holidays and special dates is a source of confusion:(a) According to the New York Times of January 12, 1999, for example, Mi-

crosoft WindowsR 95, 98, and NT get the start of daylight saving time wrongfor years, like 2001, in which April 1 is a Sunday; in such cases Windowshas daylight saving time starting on April 8. An estimated 40 million to 50million computers are affected, including some in hotels that are used forwake-up calls.

(b) Microsoft OutlookR 98 has the wrong date for U. S. Memorial Day in 1999,giving it as May 24, 1999, instead of May 31, 1999. It gives wrong datesfor U. S. Thanksgiving Day for 1997–2000. OutlookR 2000 corrected theMemorial Day error, but compounded the Thanksgiving Day error by givingtwo dates for Thanksgiving for 1998–2000.

(c) Various programs calculate the Hebrew calendar by first determining thedate of Passover using Gauss’s method [3] (see [7]); this method is correctonly when sufficient precision is used, and thus such an approach often leadsto errors.

(d) Delrina Technology’s 1994 Daily Planner has 3 days for Rosh ha-Shanah.5. At least one modern, standard source for calendrical matters, Parise [5], has many

errors, some of which are presumably not due to sloppy editing, but to the algo-rithms used to produce the tables. For example, the Mayan date 8.1.19.0.0 is given

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

xxii Preface

incorrectly as February 14, 80 (Gregorian) on page 290; the dates given on pages325–327 for Easter for the years 1116, 1152, and 1582 are not Sundays; the epactfor 1986 on page 354 is wrongly given as 20; Chinese New Year is wrong formany years; the epoch is wrong for the Ethiopic calendar, and hence that entiretable is flawed.

6. Even the Astronomical Applications Department of the U. S. Naval Observa-tory is not immune to calendrical errors! They gave Sunday, April 9, 2028 andThursday, March 29, 2029 for Passover on their web site http://aa.usno.navy.mil/faq/docs/passover.html, instead of the correct dates Tues-day, April 11, 2028 and Saturday, March 31, 2029, respectively. The site wascorrected on March 10, 2004.

Finally, the computer world is plagued with unintelligible code that seems to workby magic. Consider the following Unix script for calculating the date of Easter:

1 echo $* ’[ddsf[lfp[too early

2 ]Pq]s@1583>@

3 ddd19%1+sg100/1+d3*4/12-sx8*5+25/5-sz5*4/lx-10-sdlg11*20+lz+lx-30%

4 d[30+]s@0>@d[[1+]s@lg11<@]s@25=@d[1+]s@24=@se44le-d[30+]s@21>@dld+7%-7+

5 [March ]smd[31-[April ]sm]s@31<@psnlmPpsn1z>p]splpx’ | dc

We want to provide transparent algorithms to replace the gobbledegook that is socommon.

The algorithms presented also serve to illustrate all the basic features of nonstan-dard calendars: The Mayan calendar requires dealing with multiple, independentcycles and exemplifies the kind of reasoning often needed for calendrical-historicalresearch. The French and Chinese calendars are examples in which accurate astro-nomical calculations are paramount. The Hindu calendar is an example of one inwhich the cycles (days of the month, months of the year) are irregular.

We hope that in the process of reworking classical calendrical calculations andrephrasing them in the algorithmic language of the computer age we have also suc-ceeded in affording the reader a glimpse of the beauty and individuality of diversecultures past and present.

The Third Edition

Obiter dicimus priorem illam editionem huius ævi ingeniorum examen fuisse, exqua non minus quid non possent, quam quid nollent scire, perspici potuit.

[We say in passing that the first edition was a test for the minds of this age, fromwhich both what they could not, and what they did not want to know could be seen.]

—Joseph Justus Scaliger: De Emendatione Temporum,dedication to the second edition (1598)

After the first edition of the book was published in 1997 we continued to gathermaterial, polish the algorithms, and keep track of errors. Because the second edi-tion was to be published in the year 2000, some wag at Cambridge University Pressdubbed it “The Millennium Edition,” and that title got used in prepublication cata-logs, creating a fait accompli. The millennium edition was a comprehensive revision

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Preface xxiii

of the first edition. Since its publication, we have continued to gather new materialand polish existing material; this third edition is, once again, a comprehensiverevision.

In preparing this third edition we have corrected all known errors (though, fortu-nately, no serious errors were ever reported in the Millennium Edition), added muchnew material, reworked and rearranged some of the material from the MillenniumEdition to accommodate the new material, improved the robustness of the functions,added many new references, and made an enormous number of small improvements.Among the new material the reader will find a new section on Zeller’s congruence,a new chapter on generic cyclical calendars, a new section on which weekdays arepossible for Hebrew calendar dates, and a greatly enlarged section on the determi-nation of holidays on the modern Hindu calendars; implementations of the Aztec,Korean, Vietnamese, variants of the Hindu calendars, and Tibetan calendars havealso been added. We made a major effort to improve the automatic typesetting ofour functions and make the cross references more accurate.

Calendrical Tabulations

A man who possessed a calendar and could read it was an important member of thevillage community, certain to be widely consulted and suitably awarded.

—K. Tseng: “Balinese Calendar,”Myths & Symbols in Indonesian Art (1991)

A companion volume by the authors, Calendrical Tabulations, is also available. Itcontains tables for easy conversion of dates and some holidays on the world’s ma-jor calendars (Gregorian, Hebrew, Islamic, Hindu, Chinese, Coptic/Ethiopic, andPersian) for the years 1900–2200. These tables were computed using the Lisp func-tions from Appendix B of the Millennium Edition and typeset directly from LATEXoutput produced by driver code.

To insure that our calendar functions were not corrupted in making the changesnecessary for the third edition of Calendrical Calculations, we recomputed the ta-bles in Calendrical Tabulations with the functions from this third edition. Only thefollowing immaterial discrepancies were found:

• The depression angle used for astronomical sunrise for the Hindu calendar waschanged slightly between editions (see page 298), causing an occasional one-dayshift in leap days and expunged days.

• Some constants in the astronomical code were updated, causing occasional one-minute differences in the rounded times of lunar phases.1

1 The following minor errors regarding lunar phases in Calendrical Tabulations should be noted: First,the dust jacket uses a negative image of the calendar pages; this has the effect of interchanging thefull/new moon symbols and the first quarter/last quarter symbols visible in the Gregorian calendar atthe middle bottom. Second, our rounding of times was incompatible with our method of determininga date, so that when a lunar phase (or equinox or solstice) occurs seconds before midnight, the dateis correctly indicated, but the time is rounded up to midnight and shown as 0:00 instead of 24:00.Finally, when two lunar phases occur during the same week, the times given at the right are in reverseorder.

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

xxiv Preface

• The functions for computing Hindu holidays were improved, compared to thoseused in Calendrical Tabulations (these functions, given in Section 18.6, were notgiven in previous editions of Calendrical Calculations), so that now only non-leap days are indicated.

I determined, therefore, to attempt the reformation; I consulted the best lawyers andthe most skilled astronomers, and we cooked up a bill for that purpose. But then mydifficulty began: I was to bring in this bill, which was necessarily composed of law

jargon and astronomical calculations, to both of which I am an utter stranger.However, it was absolutely necessary to make the House of Lords think that I knew

something of the matter; and also to make them believe that they knew somethingthemselves, which they do not. For my own part, I could just as soon have talked

Celtic or Sclavonian to them, as astronomy, and could have understood me full aswell; so I resolved . . . to please instead of informing them. I gave them, therefore,

only an historical account of calendars, from the Egyptian down to the Gregorian,amusing them now and then with little episodes. . . . They thought I was informed,

because I pleased them; and many of them said, that I had made the whole storyvery clear to them; when, God knows, I had not even attempted it.

—Letter from Philip Dormer Stanhope (Fourth Earl of Chesterfield,the man who in 1751 introduced the bill in Parliament for reforming

the calendar in England) to his son, March 18, 1751 C.E. (Julian), theday of the Second Reading debate

The Cambridge University Press Web Site

Unlike the Millennium Edition, this edition of Calendrical Calculations does notinclude a compact disc. Rather, it was decided to make the code available through aCambridge University Press web site,

http://www.cambridge.org/us/9780521702386

That web site contains links to files related to this book, including the Lisp codefrom Appendix C.

The Authors’ Web Page

The author has tried to indicate every known blemish in [2]; and he hopes thatnobody will ever scrutinize any of his own writings as meticulously as he and others

have examined the ALGOL report.—Donald E. Knuth: “The Remaining Trouble Spots in ALGOL 60,”

Communications of the ACM (1967)

To facilitate electronic communication with our readers, we have established a homepage for this book on the World Wide Web:

http://www.calendarists.com

An errata document for the book is available via that home page. Try as we have, atleast one error remains in this book.

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Preface xxv

Acknowledgments

It is traditional for the author to magnanimously accept the blame for whateverdeficiencies remain. I don’t. Any errors, deficiencies, or problems in this book are

somebody else’s fault, but I would appreciate knowing about them so as todetermine who is to blame.

—Steven Skiena: The Algorithm Design Manual (1997)

Stewart M. Clamen wrote an early version of the Mayan calendar code. Parts ofSection 2.3 are based on suggestions by Michael H. Deckers. Chapter 19 is based inpart on the work of Svante Janson.

Our preparation of the third edition was aided considerably by the help ofHelmer Aslaksen, Rodolphe Audette, Armond Avanes, Haim Avron, Kfir Bar,Olivier Beltrami, Irvin Bromberg, Ananda Shankar Chakrabarty, Anoop Chaturvedi,Franz Corr, Nicholas J. Cox, John Cross, Ehssan Dabal, Michael H. Deckers, IdanDershowitz, Robert H. Douglass, Donald W. Fausett, Winfried Gorke, EdwardHenning, Nicolas Herran, Burghart Hoffrichter, Peter Zilahy Ingerman, SvanteJanson, Daher Kaiss, Richard P. Kelly, Richard M. Koolish, Jonathan Leffler,Alon Lerner, Yaaqov Loewinger, Andrew Main, Zhuo Meng, Ofer Pasternak,Andy Pepperdine, Tom Peters, Pal Singh Purewal, K. Ramasubramanian, AkshayRegulagedda, Nigel Richards, Denis B. Roegel, Theodore M. Rolle, Arthur J.Roth, Jeff Sagarin, Robert A. Saunders, Shriramana Sharma, S. Khalid Shaukat,G. Sivakumar, Michael R. Stein, Otto Stolz, Claus Tondering, Robert H. van Gent,Oscar van Vlijmen, Eiiti Wada, Helmut Wildmann, and Fariba Zarineba, whopointed out errors, suggested improvements, and helped gather materials. We alsothank all those acknowledged in the prior editions for their help.

The late Gerald M. Browne, Sharat Chandran, Shigang Chen, Jeffrey L.Copeland, Nazli Goharian, Mayer Goldberg, Shiho Inui, Yoshiyasu Ishigami,Howard Jacobson, Subhash Kak, Claude Kirchner, Sakai Ko, Jungmin Lee, NabeelNaser El-deen, the late Gerhard A. Nothmann, Trần Đức Ngọc, Roman Waupotitsch,Daniel Yaqob, and Afra Zomorodian helped us with various translations and foreignlanguage fonts. Charles Hoot labored hard on the program for automatically trans-forming Lisp code into arithmetic expressions and provided general expertise inLisp. Mitchell A. Harris helped with fonts, star names, and the automatic translation;Benita Ulisano was our tireless system support person; Marla Brownfield helpedwith various tables. Erga Dershowitz, Idan Dershowitz, Molly Flesner, SchulamithHalevy, Christine Mumm, Deborah Reingold, Eve Reingold, Rachel Reingold, RuthReingold, and Joyce Woodworth were invaluable in proofreading tens of thousandsof dates, comparing our results with published tables. We are grateful to all of them.

Portions of this book appeared, in a considerably less polished state, in our papers[2] and [6]. We thank John Wiley & Sons for allowing us to use that material here.

THE END.This work was completed on the 17th or 27th day of May, 1618; but Book v was

reread (while the type was being set) on the 9th or 19th of February, 1619.At Linz, the capital of Austria—above the Enns.

—Johannes Kepler: Harmonies of the World

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

xxvi Preface

I have not always executed my own scheme, or satisfied my own expectations. . . .[But] I look with pleasure on my book however defective and deliver it to the world

with the spirit of a man that has endeavored well. . . . When it shall be found thatmuch is omitted, let it not be forgotten that much likewise has been performed.

—Samuel Johnson: preface to his Dictionary

R.D. 732716Tel Aviv, Israel N.D.Chicago, Illinois E.M.R.

References

[1] A. Birashk, A Comparative Calendar of the Iranian, Muslim Lunar, and Christian Erasfor Three Thousand Years, Mazda Publishers (in association with Bibliotheca Persica),Costa Mesa, CA, 1993.

[2] N. Dershowitz and E. M. Reingold, “Calendrical Calculations,” Software—Practice andExperience, vol. 20, no. 9, pp. 899–928, September 1990.

[3] C. F. Gauss, “Berechnung des judischen Osterfestes,” Monatliche Correspondenz zurBeforderung der Erd- und Himmelskunde, vol. 5 (1802), pp. 435–437. Reprinted inGauss’s Werke, Herausgegeben von der Koniglichen Gesellschaft der Wissenschaften,Gottingen, vol. VI, pp. 80–81, 1874; republished, Georg Olms Verlag, Hildesheim, 1981.

[4] P. G. Neumann, “Inside Risks: The Clock Grows at Midnight,” Communications of theACM, vol. 34, no. 1, p. 170, January 1991.

[5] F. Parise, ed., The Book of Calendars, Facts on File, New York, 1982.[6] E. M. Reingold, N. Dershowitz, and S. M. Clamen, “Calendrical Calculations, Part II:

Three Historical Calendars,” Software—Practice and Experience, vol. 23, no. 4, pp. 383–404, April 1993.

[7] I. Rhodes, “Computation of the Dates of the Hebrew New Year and Passover,” Computers& Mathematics with Applications, vol. 3, pp. 183–190, 1977.

[8] R. M. Stallman, GNU Emacs Manual, 13th ed., Free Software Foundation, Cambridge,MA, 1997.

[9] G. L. Steele, Jr., Common Lisp: The Language, 2nd ed., Digital Press, Bedford, MA,1990.

[10] Letter to Nachum Dershowitz from Kay Wilkins, Customer Relations Representative,Lotus Development Corporation, Cambridge, MA, April 21, 1992.

La dernière chose qu’on trouve en faisant un ouvrage, est de savoir celle qu’il fautmettre la première.

[The last thing one settles in writing a book is what one should put in first.]—Blaise Pascal: Pensées sur l’esprit et le style (1660)

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

Credits

Whoever relates something in the name of its author brings redemption to the world.—Midrash Tanh. uma (Numbers, 27)

Quote on page xix from Epistles of Maimonides: Crisis and Leadership, A. Halkin,trans., Jewish Publication Society, 1993; used with permission.

Translation of Scaliger’s comment on the Roman calendar on page 63 is fromA. T. Grafton, Joseph Scaliger: A Study in the History of Classical Scholarship,vol. II, Historical Chronography, Oxford University Press, Oxford, 1993; used withpermission.

Translation of Ptolemy III’s Canopus Decree on page 76 is from page 90 ofR. Hannah, Greek & Roman Calendars, Gerald Duckworth & Co., Ltd., London,2005; used with permission.

Translation on page 90 of Scaliger’s comment on the Hebrew calendar (found onpage 294 of Book 7 in the 1593 Frankfort edition of De Emendatione Temporum) isby H. Jacobson; used with permission.

Translation of “The Synodal Letter” on page 113 (found in Gelasius, HistoriaConcilii Nicæni, book II, chapter xxxiii) from J. K. Fotheringham, “The Calendar,”The Nautical Almanac and Astronomical Ephemeris, His Majesty’s StationeryOffice, London, 1931–1934; revised 1935–1938; abridged 1939–1941.

Translation of the extract from Canon 6 of Gregorian reform on page 114 is byM. H. Deckers; used with permission.

Translation of Quintus Curtius Rufus quotation on page 217 is from J. C. Rolfe,History of Alexander, Harvard University Press, Cambridge, MA, 1946.

Letter on page 233 reprinted with permission.

xxvii

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

License and Limited Warranty and Remedy

The Functions (code, formulas, and calendar data) contained in this book were writ-ten by Nachum Dershowitz and Edward M. Reingold (the “Authors”), who retainall rights to them except as granted in the License and subject to the warranty andliability limitations below. These Functions are subject to this book’s copyright.

In case there is cause for doubt about whether a use you contemplate is autho-rized, please contact the Authors.

1. LICENSE. The Authors grant you a license for personal use. This means that forstrictly personal use you may copy and use the code and keep a backup or archivalcopy also. The Authors grant you a license for re-use within non-commercial,non-profit software provided prominent credit is given and the Authors’ rightsare preserved. Any other uses, including, without limitation, allowing the code orits output to be accessed, used, or available to others, are not permitted.

2. WARRANTY.(a) The Authors and Publisher provide no warranties of any kind, either express

or implied, including, without limiting the generality of the foregoing, anyimplied warranty of merchantability or fitness for a particular purpose.

(b) Neither the Authors nor Publisher shall be liable to you or any third par-ties for damages of any kind, including without limitation, any lost profits,lost savings, or other incidental or consequential damages arising out of, orrelated to, the use, inability to use, or accuracy of calculations of the codeand functions contained herein, or the breach of any express or implied war-ranty, even if the Authors or Publisher have been advised of the possibilityof those damages.

(c) The foregoing warranty may give you specific legal rights which may varyfrom state to state in the U.S.A.

3. LIMITATION OF LICENSEE REMEDIES. You acknowledge and agree that your exclu-sive remedy (in law or in equity), and Authors’ and Publisher’s entire liabilitywith respect to the material herein, for any breach of representation or for any in-accuracy shall be a refund of the price of this book. Some States in the U.S.A. donot allow the exclusion or limitation of liability for incidental or consequentialdamages, and thus the preceding exclusions or limitation may not apply to you.

xxviii

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

License and Limited Warranty and Remedy xxix

4. DISCLAIMER. Except as expressly set forth above, Authors and Publisher:(a) make no other warranties with respect to the material and expressly disclaim

any others;(b) do not warrant that the functions contained in the code will meet your re-

quirements or that their operation shall be uninterrupted or error free;(c) license this material on an “as is” basis, and the entire risk as to the quality,

accuracy, and performance herein is yours should the code or functions provedefective (except as expressly warranted herein). You alone assume the entirecost of all necessary corrections.

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information

CALENDRICAL CALCULATIONS, Third Edition

© Cambridge University Press www.cambridge.org

Cambridge University Press978-0-521-70238-6 - Calendrical Calculations, Third EditionNachum Dershowitz and Edward M. ReingoldFrontmatterMore information