Calendrical Calculations in Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
COPYRIGHT_DERSHOWITZ_REINGOLD
Install.md
Readme.md
STATUS
astro.mp
calendrica-3.0.cl
calendrica-3.0.errata.cl
dates1.tex
dates2.tex
dates3.tex
dates4.tex
dates5.errata.csv
dates5.tex
errata20091115.pdf
errata20091119.pdf
errata20091230.pdf
errata20110623.pdf
errata20130806.pdf
fig_alt-az.asy
fig_alt-az.png
fig_coord_transform.gv
fig_coord_transform.png
fig_ecliptic.mp
fig_ra-dec.mp
makemake.sh
pycalcal.bib
pycalcal.nw

Readme.md

PyCalCal is a Python library that makes it easy:

  • to convert dates from/to 31 different calendars
  • to calculate special dates/times such as holidays, astronomical events (equinoxes, solstices ...), sunrise/sunset
  • to try it online (experimental !!)

PyCalCal is an implementation in Python of CALENDRICA 3.0, which is the Common Lisp implementation of the functions described in the book

Nachum Dershowitz, Edward M. Reingold "Calendrical Calculations"
Cambridge University Press; 3rd edition (December 10, 2007)
Paperback; ISBN-13: 9780521702386
E. M. Reingold and N. Dershowitz,
3rd ed., Cambridge University Press, 2008.

Some of the algorithms are from:

Jean Meeus "Astronomical Algorithms"
Willmann-Bell, Inc.; 2nd edition (1998 with corrections as of June 15, 2005);
ISBN: 0-943396-61-1

STATUS

I, Enrico Spinielli, implemented PyCalCal for fun and to further glory in the beauty of the work of the authors of the book. Having said so, PyCalCal code is pretty well tested and usable.

See 'STATUS' file for further details.

Acknowledgements

I want to thank:

  • Prof.s Reingold and Dershowitz for their prompt replies to my (sometimes silly, other times pertinent) questions
  • my family, Gilda and the kids, for the good they bring to my life (and the time they let me spend with all this)
  • my parents and parents-in-law for their past and continuous support

Notes

CALENDRICAL 3.0 is written and copyrighted by E. M. Reingold and N. Dershowitz as described in file 'COPYRIGHT_DERSHOWITZ_REINGOLD'

Resources

Prof. Reingold mantains a companion site for the book.

The resource page of the book at Cambridge University Press provides a link to a zipped version of 'calendrica-3.0.cl' which I included unzipped in PyCalCal project repo in order to be able to reference the relevant snippets of the original implementation.

Files 'dates[1-5].tex', containing test data, have been kindly provided to me by Prof. Reingold.