is an option that determines the calendar system in which all dates are to be interpreted and output.
CalendarType
is an option that determines the calendar system in which all dates are to be interpreted and output.
Details
- CalendarType is typically used to specify how to interpret dates without a calendar, or to convert date objects from another calendar.
- In general, the default value of CalendarType is "Gregorian".
- 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 all close allBasic Examples (3)
Get the current date on the Jewish calendar:
DateObject[CalendarType -> "Jewish"]Represent a Julian calendar date:
DateObject[{2026, 8, 4}, CalendarType -> "Julian"]Get the next month on the Chinese lunar calendar:
NextDate["Month", CalendarType -> "Chinese"]Parameterized calendars can be used to adjust the values for "StartOfDay" or "YearZero" handling:
DateObject[{1, 1, 1}, CalendarType -> "Gregorian"] - Quantity[2, "Days"]DateObject[{1, 1, 1}, CalendarType -> {"Gregorian", <|"YearZero" -> True|>}] - Quantity[2, "Days"]Scope (3)
Represent the month of Ramadan on the Islamic calendar:
DateInterval[DateObject[{1446, 9}, "Month", "Islamic"], CalendarType -> "Islamic"]Compute a date range returning dates in the Islamic calendar:
DateRange[DateObject[{2022, 1, 1}], DateObject[{2022, 3, 1}], "Week", CalendarType -> "Islamic"]Construct a TimeSeries object with dates in the "Julian" calendar:
TimeSeries[Range[5], {DateObject[{2024, 2, 14}, CalendarType -> "Julian"], Automatic, "Day"}]Convert those dates to the "Islamic" calendar:
TimeSeries[%, CalendarType -> "Islamic"]Normal[%]Applications (1)
Properties & Relations (2)
The list of available calendar types can be found using CalendarData:
CalendarData["DateCalendar"]This includes both arithmetic and astronomical calendar types:
CalendarData["ArithmeticCalendar"]CalendarData["AstronomicalCalendar"]The default calendar type in DateObject is "Gregorian":
range = DateRange[DateObject[{2022, 1, 1}], DateObject[{2022, 2, 1}], "Week"]Change the output for the same dates to the "Jewish" calendar:
DateRange[DateObject[{2022, 1, 1}], DateObject[{2022, 2, 1}], "Week", CalendarType -> "Jewish"]% == rangeChange the calendar of the input dates as well:
DateRange[DateObject[{2022, 1, 1}, CalendarType -> "Jewish"], DateObject[{2022, 2, 1}, CalendarType -> "Jewish"], "Week", CalendarType -> "Jewish"]The date range now represents a different period in time:
% == rangeRelated Guides
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_2026_calendartype, author="Wolfram Research", title="{CalendarType}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/CalendarType.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_calendartype, organization={Wolfram Research}, title={CalendarType}, year={2020}, url={https://reference.wolfram.com/language/ref/CalendarType.html}, note=[Accessed: 12-June-2026]}