CalendarConvert

CalendarConvert[date,calendar]

converts the date object date to the specified calendar type calendar.

CalendarConvert[date]

converts to the default calendar type.

CalendarConvert[{date1,,daten},calendar]

converts date1 through daten to the specified calendar.

Details

  • date specifications should be a DateObject expression.
  • 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
  • Prominent arithmetic calendar types are: "Gregorian", "Julian", "Jewish" and "Islamic". Additional calendars are given by CalendarData["DateCalendar"].

Examples

open allclose all

Basic Examples  (1)

Convert from the Gregorian to the Julian calendar:

Convert from the Islamic to the Jewish calendar:

Applications  (2)

William Shakespeare died on April 23, 1616, in the Julian calendar:

In the Gregorian calendar, that corresponds to May 3:

Julian date 0 corresponds to this instant in the proleptic Gregorian calendar:

It is January 1, -4713 noon GMT in the Julian calendar:

Properties & Relations  (2)

DateObject[CalendarType->cal] is equivalent to CalendarConvert[DateObject[],cal]:

Dates between March 1, 200 and February 28, 300 coincide in the Gregorian and Julian calendars:

Possible Issues  (1)

For dates with coarse granularity, such as DateObject[{2022}], different calendars may not align completely:

In such cases, CalendarConvert will use the midpoint of the given date for conversion:

Neat Examples  (1)

Get the current date in all available calendars:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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