CalendarData

CalendarData[cal]

gives the default parameters associated with the date calendar cal.

CalendarData[country]

gives available holiday calendars for the stock exchanges in the country entity.

CalendarData[cal,param]

gives the value of the specified parameter param for calendar cal.

Details

  • Calendars assign labels (numeric or named) to moments and extended periods of time, usually following the cycles of the Sun or the Moon. Calendars organize much of social, scientific, economic, administrative or religious activity.
  • CalendarData handles two types of calendars: date calendars like the Gregorian or the Julian calendars, and holiday calendars of countries and stock exchanges.
  • Date calendars can be given as named objects, like "Gregorian" or "Julian", or in the form {"name",<|param1val1,param2value2,|>} for calendars with nondefault parameter values.
  • Typically, calendars represent a date using a list of numbers, but may also contain Boolean or string values.
  • There are two general categories of date calendars: those based on fixed arithmetic rules and those based on astronomical observation of special events for the Sun and the Moon.
  • Calendar granularities vary between date calendars, as well as the lengths of different granularities.
  • Prominent arithmetic calendars include:
  • "Gregorian"Gregorian arithmetic calendar
    "Islamic"Islamic arithmetic calendar
    "Jewish"Jewish arithmetic calendar
    "Julian"Julian arithmetic calendar
  • Numeric arithmetic calendars include:
  • "AbsoluteTime"seconds since Jan 1, 1900
    "BesselianYear"Besselian year number
    "GregorianYear"Gregorian year number
    "JulianDate"full Julian day number
    "JulianYear"Julian year number
    "UnixTime"seconds since Jan 1, 1970
  • Historically significant arithmetic calendars include:
  • "ArithmeticFrench"Revolutionary French arithmetic calendar
    "ArithmeticPersian"Persian arithmetic calendar
    "AztecTonalpohualli"Aztec arithmetic calendar
    "AztecXihuitl"Aztec arithmetic calendar
    "BalinesePawukon"Balinese arithmetic calendar
    "Coptic"Coptic arithmetic calendar
    "Ethiopic"Ethiopic arithmetic calendar
    "MayanHaab"Mayan arithmetic calendar
    "MayanLongCount"Mayan arithmetic calendar
    "MayanTzolkin"Mayan arithmetic calendar
    "OldHinduLunisolar"historical Hindu lunisolar calendar
    "OldHinduSolar"historical Hindu solar calendar
    "WesternBahai"Bahai solar calendar
  • Recently proposed arithmetic calendars include:
  • "HankeHenryPermanent"HankeHenry perennial calendar
    "Holocene"Holocene algorithmic calendar
    "InternationalFixed"International Fixed perennial calendar
    "Symmetry454"Symmetry454 perennial calendar
    "World"World arithmetic calendar
  • Other arithmetic calendars include:
  • "Icelandic"Icelandic arithmetic calendar
    "ISOOrdinal"ISO-8601 arithmetic ordinal calendar
    "ISOWeek"ISO-8601 arithmetic week calendar
    "Japanese"Japanese regnal (gengo) calendar
    "Newtonian"Newton's proposed arithmetic calendar
  • Astronomical calendars include solar, lunisolar and lunar calendars.
  • Solar astronomical calendars include:
  • "AstronomicalFrench"French solar calendar
    "AstronomicalPersian"Persian astronomical calendar
    "ModernHinduSolar"contemporary Hindu solar calendar
    "OldHinduSolar"historical Hindu solar calendar
  • Lunisolar astronomical calendars include:
  • "ModernHinduLunisolar"contemporary Hindu lunisolar calendar
    "OldHinduLunisolar"historical Hindu lunisolar calendar
    "Tibetan"Tibetan lunisolar calendar
  • Lunar astronomical calendars include:
  • "Babylonian"Babylonian lunar calendar
    "Chinese"Chinese lunar calendar
    "ObservationalHebrew"Hebrew observational lunar calendar
    "ObservationalIslamic"Islamic observational lunar calendar
  • Local regional and historical variations may affect the results of calendar conversions by differences of several units in the smaller granularities. For example, different countries adopted the Gregorian calendar on different dates.
  • Calendar parameters include:
  • "Location"reference geodetic position for astronomical calendars
    "StartOfDay"beginning instant of the day
    "YearZero"whether the calendar includes a year zero
  • Possible values for "StartOfDay" include "PreviousNoon", "Sunset", "Midnight", "Sunrise", "NextNoon" or a numeric value from 1/2 to 1/2 indicating fractional day offset from midnight. String "StartOfDay" values are given by the following table:
  • "PreviousNoon"
    "Sunset"
    "Midnight"0
    "Sunrise"
    "NextNoon"
  • "Location" parameters should be a valid GeoPosition expression or location Entity and are relevant for astronomical calendars that use a reference location only.
  • Additional properties of calendars include:
  • "DayNames"list of day names for a week
    "EpochDate"initial moment of counting in the calendar
    "Granularities"list of subdivisions such as year, month and day
    "GranularityQuantities"unit step size associated with each calendar granularity
    "GranularityRanges"acceptable ranges for each calendar granularity value
    "MonthNames"list of names for each month
  • CalendarData[cal,"PropertyAssociation"] will give an association of all properties and their values. CalendarData[cal,"Dataset"] will return a Dataset expression instead.
  • The holiday calendar of a given country is specified using the "Country" entity of the country.
  • CalendarData[class] gives a list of calendar information associated with the calendar group class. Possible class specifications include "HolidayCalendar", "DateCalendar", "AstronomicalCalendar" and "ArithmeticCalendar".
  • CalendarData[] is equivalent to CalendarData["HolidayCalendar"].
  • CalendarData[cal,class] will return True if calendar is a member of the calendar group class, and False otherwise.

Examples

open allclose all

Basic Examples  (5)

Check the default parameters associated with the Gregorian calendar:

Check the parameter for the Astronomical French Revolutionary calendar:

Check the value of a specific property for a given calendar:

Check the value of all properties for a given calendar:

List all available date calendars:

List all countries for which holiday schedules are currently defined:

List all market-specific schedules available for a given country:

Scope  (3)

Many calendars have days that begin at midnight:

However, some calendars use sunrise, sunset or noon as the start of a day:

Some calendars have different conventions for handling the absence or presence of year zero:

The handling of year zero can be controlled by the use of the parameters in a calendar:

Many astronomical calendars use a reference location for observations of the Sun and/or Moon:

For other calendars, no location is used:

Properties & Relations  (4)

Calendar "AbsoluteTime" corresponds to the value of the function AbsoluteTime:

Calendar "JulianDate" corresponds to the value of the function JulianDate in GMT time zone:

Calendar "JulianYear" counts years of fixed duration 365.25 days:

Calendar "GregorianYear" counts years of fixed duration 365.2425 days:

Calendar "BesselianYear" counts years of fixed duration approximating a tropical year:

Gregorian date {y,1,1,12,0,0} coincides with Julian year y every four years:

Gregorian date {y,1,1,0,0,0} coincides with Gregorian year y every 400 years:

Wolfram Research (2012), CalendarData, Wolfram Language function, https://reference.wolfram.com/language/ref/CalendarData.html (updated 2021).

Text

Wolfram Research (2012), CalendarData, Wolfram Language function, https://reference.wolfram.com/language/ref/CalendarData.html (updated 2021).

CMS

Wolfram Language. 2012. "CalendarData." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/CalendarData.html.

APA

Wolfram Language. (2012). CalendarData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CalendarData.html

BibTeX

@misc{reference.wolfram_2024_calendardata, author="Wolfram Research", title="{CalendarData}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/CalendarData.html}", note=[Accessed: 26-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_calendardata, organization={Wolfram Research}, title={CalendarData}, year={2021}, url={https://reference.wolfram.com/language/ref/CalendarData.html}, note=[Accessed: 26-December-2024 ]}