As of Version 10.0, calendar functionality is built into the Wolfram Language »

Calendar Package

This package provides a unified treatment of the basic calendar operations. The main idea is to treat the calendar as a generalized number system, so that days, weeks, months, and years are thought of as generalizing the digits of a number in a given base.

DayOfWeek[{year,month,day}]give the day of the week on which the given date occurred
DaysBetween[{year1,month1,day1},{year2,month2,day2}]
give the number of days between the given dates
DaysPlus[{year,month,day},n]give the date n days after the given date

Calendar computations using the standard calendar.

This loads the package.
The basic calendar utility is finding the day of the week.
This computes the number of days between the given dates. The year 1900 was not a leap year.
January 2, 1901 is 366 days after January 1, 1900.
DayOfWeek[{year,month,day},Calendar->cal]
give the day of the week on which the given date occurred using the calendar system cal
DaysBetween[{year1,month1,day1},{year2,month2,day2},Calendar->cal]
give the number of days between the given dates using the calendar system cal
DaysPlus[{year,month,day},n,Calendar->cal]
give the date n days after the given date using the calendar system cal
CalendarChange[{year,month,day}, cal1,cal2]
convert the date given in cal1 into a date given in cal2

Calendar computations using specified systems.

The Gregorian calendar has been in use in the Western world since 1582 by Roman Catholic countries, and since 1752 by Englishspeaking countries. The Gregorian calendar counts leap years every year divisible by 4, except for centuries not divisible by 400, which are not leap years.

The calendar used before the Gregorian calendar was the Julian calendar. This system counts every year divisible by 4 as a leap year. At present there is a disparity of 13 days between the calendars. The changeover between these two calendars was done by omitting a number of days; therefore you must account for this in computations.

The default calendar used in this package is the one used by England and her former colonies (e.g. the United States). It uses the Gregorian calendar for dates starting with September 14, 1752, and the Julian calendar for dates up to September 2, 1752. If you do not specify a system, this is the calendar used by DayOfWeek, DaysBetween, and DaysPlus.

The Julian calendar is valid to March 1, year 4, but not before then, since the year 4 was not a leap year.

The Islamic calendar is used mainly to keep track of Islamic holy days. It is a purely lunar calendar and a year has either 354 or 355 days. The months do not correspond to the solar year and migrate over the solar year following a 30year cycle. The Islamic calendar began on the Hegira, which was July 16, 622 in the Julian calendar.

In the Julian calendar, the year beginning a century not divisible by 400 is a leap year.
The Gregorian calendar is 13 days ahead of the Julian calendar.
Here is a conversion into the Islamic system.
This gives the first day in the Islamic system, the date of the Hegira. The date is given in the Julian calendar because the Gregorian calendar was not used before 1582.
EasterSunday[year]give the date of Easter Sunday in the Gregorian system
EasterSundayGreekOrthodox[year]give the date of Easter Sunday according to the Greek Orthodox Church using the Gregorian system
JewishNewYear[year]give the date of the Jewish New Year occurring in Gregorian years between 1900 and 2099

Dates of holidays.

In 1945, Easter Sunday was on April 1.
This uses the pre-Gregorian computation, but the result is given as a Gregorian date.
This gives the date of the Jewish New Year in the Gregorian year 1997.