CalendarType

CalendarType

is an option that determines the calendar system in which all dates are to be interpreted and output.

Details

  • CalendarType is set to "Gregorian" by default.
  • 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.
  • Calendar parameters include:
  • "YearZero"whether the calendar includes a year zero
    "StartOfDay"beginning instant of the day
    "Location"reference geodetic position for astronomical calendars
  • Default calendar parameters can be obtained using CalendarData["name"].
  • Prominent arithmetic calendars include:
  • "Gregorian"proleptic Gregorian calendar
    "Islamic"tabular Islamic calendar
    "Jewish"arithmetic lunisolar Hebrew calendar
    "Julian"proleptic Julian calendar
  • Additional arithmetic calendars are given by CalendarData["ArithmeticCalendar"]. Astronomical calendars are given by CalendarData["AstronomicalCalendar"].

Examples

open allclose all

Basic Examples  (3)

Get the current date on the Jewish calendar:

Represent a Julian calendar date:

Parameterized calendars can be used to adjust the values for "StartOfDay" or "YearZero" handling:

Compute a date range returning dates in the Islamic calendar:

Scope  (1)

Use CalendarType to specify time stamps in an EventSeries or in a TimeSeries:

The dates in the above event series are now given in the default calendar type:

Create a time series specifying the start date according to the Islamic calendar:

Properties & Relations  (1)

The default calendar type in DateObject is "Gregorian":

Change the output for the same dates to the "Jewish" calendar:

Change the calendar of the input dates as well:

The date range now represents a different period in time:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_calendartype, author="Wolfram Research", title="{CalendarType}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/CalendarType.html}", note=[Accessed: 17-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_calendartype, organization={Wolfram Research}, title={CalendarType}, year={2020}, url={https://reference.wolfram.com/language/ref/CalendarType.html}, note=[Accessed: 17-November-2024 ]}