CALENDARS
Routines for Calendrical Computations


CALENDARS is a collection of several Mathematica packages which can be used for simple calendrical calculations, including computing the number of days that have elapsed between two dates, or converting a date from one calendar to another.

A package is a group of Mathematica function definitions. Packages have a specific format; for instance, they are delimited with BeginPackage[] and EndPackage[] statements. Moreover, (and I forget this every time!) the cells in a package must be explicitly designated as "Initialization Cells" or nothing in the package will actually be usable.

In order for a package to be accessible, it must be placed in a specific directory where Mathematica can find it. Generally, this is the Applications subdirectory of the user base directory, which can be determined by:

        SetDirectory[$UserBaseDirectory]
      

The functions defined in a package are made available by using a special command, such as

        << SimplestCalendar
      

Once the new package has been placed, you should probably run Mathematica and direct it to rebuild the Help database. This will serve to update Mathematica's internal information so that it can explain how the functions in the package are called.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Data and Programs:

CALENDAR_NYT, a FORTRAN90 library which shows the correspondence between dates and the New York Times volume and issue number;

CALENDAR_RD, a C++ program which computes the representation of a given date in a number of calendrical systems, by Edward Reingold and Nachum Dershowitz

CALENDAR_RD, a C++ program which computes the representation of a given date in a number of calendrical systems, by Edward Reingold and Nachum Dershowitz

CALPAK is a FORTRAN90 library which converts between dates as computed on various calendars.

DATES is a dataset directory which contains lists of dates in various calendar systems.

Reference:

  1. Ilan Vardi,
    Computational Recreations in Mathematica,
    Addison Wesley,
    ISBN: 0-201-52989-0,
    LC: QA76.95.V36.

Source Code:

SimplestCalendar is a very simple calendar, which has 365 days every year.

JulianCalendar is the Julian calendar, with a leap year every 4 years. This set of routines is not working.

GregorianCalendar is the Gregorian calendar, with a leap year every 4 years, except every 100 years, except every 400 years. This set of routines is not working.

IslamicCalendar is the Islamic calendar, with a lunar cycle. This set of routines is not working.

You can go up one level to the Mathematica packages and notebooks.


Last revised on 28 January 2009.