|
Why reinvent the wheel?I wanted calendar software that: Unfortunately I could not find such a package. Read on for specific comments on what's out there.
Dershowitz and Reingold's Calendrical CalculationsThis is a book and associated software covering all sorts of calendar calculations. Unfortunately it seems to include a very restrictive license. One of the authors of Calendrical Calculations, Edward M. Reingold, is also an author of the GNU Emacs calendar code. That code is released under GPL, but it's written in LISP, which was not directly useful for me. Reingold also has a C++ version of some of the basic calendar calculations available at his web site. This C++ code is in the public domain. I used a couple of algorithms from this public domain code. However, most of the coding effort in CalCalcs involved handling the way our calendar transitioned from the Julian calendar to the Gregorian calendar. Reingold's public domain C++ code did not address this issue, and so was of limited use to me. There is a web-based interface to the Calendrical Calculations available, which might be useful to you.
Lance Latham's Standard C Date/Time LibraryAnother commonly cited refernce is Lance Latham's Standard C Date/Time Library (SCDTL). Here is what the license for these routines says:
If I put the source code up on the web for anyone to access, is it the same as "reproducing it for publication"? It seems at the least that it would violate the copyright. Overall I decided this was not the way I wanted to go, so I have not used any code, algorithms, or information from SCDTL. Other people have decided differently; for example, there is a Javascript port of SCDTL available.
Jon Ahlquist's calndr.f routineJon Ahlquist of Florida State University has a nice web site with calendar information available, along with a GPL'd calendar routine written in Fortran. This is quite useful if you have Fortran, but that has become rather uncommon nowadays. |