calendar(date [, /fromcommon, /fromgregorian,
/fromislamic, /fromjulian, /fromjd, /fromhebrew, /fromlongcount,
/fromegyptian, /fromlunar] [, /tocommon, /togregorian, /toislamic,
/tojulian, /tojd, /tohebrew, /tomayan, /tolongcount, /toegyptian,
/tolunar, /tolatin] [, /totext, /toisotext] [, /fromutc, /fromtai,
/fromtt] [, /toutc, /totai, /tott] [, /fromymd, /fromdmy] [, /toymd,
date from one calendar system into another.
/from… keywords specify the source calendar system, and
/to… keywords the target calendar system. The input
data may be numerical or in the form of text, and likewise for the
Through keywords, one can specify calendars, time systems, date component orders, and the data output type.
indicates the Gregorian (modern Western) calendar. The first day of this calendar is 15 October 1582 (Gregorian), which followed directly after 4 October 1582 (Julian).
indicates the most widespread tabulated Islamic calendar. The first day of this calendar corresponds to 16 July 622 in the Julian calendar.
indicates the Julian (proleptic) calendar.
indicates the Julian day number system. Julian day number 0 corresponds to 1 January -4712 in the Julian calendar.
indicates the Hebrew calendar. The first day of this calendar corresponds to 6 October -3760 in the Julian calendar.
/...gregorian from 15 October 1582 (Gregorian) on and
/...julian before then.
indicates the Mayan Tikal calendar round (according to "The Book of the
Year" by Munro Edmonson).
/frommayan is not available.
indicates the Olmec Long Count (according to Edmonson). Long Count
0.0.0.0.0 corresponds to 6 September -3113 in the Julian calendar.
only works if the input is text.
indicates the Egyptian calendar used in ancient astronomy (e.g., by Ptolemy in the Almagest), with strictly 365 days per year. The year count is based on the era of Nabonassar (1 Thoth, year 1 = 26 February -746 in the Julian calendar).
indicates a (fractional) count of New Moons since the first New Moon after Julian Day number 0. The count is based on the mean motion of the Moon, disregarding short-term perturbations.
indicates the Common calendar counted the Latin way.
indicates that the dates are returned in text form, as strings, with the
(integer) day, month, and year separated by whitespace. This keyword
does not work with
indicates that the dates are returned in text form, as strings, in standard iso format: yyyy-mm-ddThh:mm:ss.
indicates that the components of each date are in the order year, month,
day. This keyword does not work with
indicates that the components of each date are in the order day, month,
year. This keyword does not work with
indicates dates/times in Coordinated Universal Time (UTC).
indicates dates/times in International Atomic Time (TAI).
indicates dates/times in Terrestrial Time (TT).
The default source calendar is
is numerical and has 3 elements in its first dimension, or if
date contains text data. Otherwise, the default source
/fromjd. The default target calendar is
unless the source calendar was
/fromjd, in which case the default
target calendar is
With numerical input, one number is expected per date for
/fromlunar, and three numbers for all other calendars.
Three-number input is interpreted by default in the order year, month,
day. For the Gregorian, Julian, Islamic, and Egyptian calendars (all of
which always have 12 months per calendar year), month and day numbers
outside of the usual ranges may be specified; month numbers are reduced
to the range of 1 - 12, adjusting the year count accordingly, and day
numbers are interpreted relative to the start of the indicated month
just like day numbers within the expected ranges. For example, the
input [232,17,43] is adjusted internally to [233,5,43], which indicates
a date 42 days after the one indicated by [233,5,1], and [232,-5,-3]
indicates a date 4 days before [231,7,1]. For most calendars, negative
and zero years may be specified.
If the input is in the form of text and
/fromlongcount is not
specified, then each string must contain a date with the day and year
written as optionally signed numbers, and the month name in characters
(not starting with a digit or a + or -). By default, the first
encountered number is taken to be the day, and the second number the
year. If the date string is incomplete, then a year, month, or day
number of 1 is assumed for the missing parts. If a single number is
specified in the text string, then it is taken to be the year number.
If an input calendar is specified, then the specified month name is
compared only to the month names associated with that calendar;
otherwise, it is compared to the month names of all calendars and the
first match is accepted. The number of month name characters that is
compared is the minimum number that is required to distinguish between
the months in the calendar: 3 for the Gregorian and Julian calendars,
4 for the Egyptian calendar, 9 for the Islamic calendar. Case is
/fromlongcount, the text input is searched for sequences of
digits separated by one or more non-digit characters. Each sequence
of digits is interpreted as a decimal number that indicates the number
of units of time at each level of the Long Count, from large to small.
There may be any (non-zero) number of levels. Each next higher level
is assumed to represent a unit of time 20 times greater than the next
lower level, except that the 3rd level is only 18 times greater than
the 2nd one. The lowest level represents days.
The default time system is
/...utc. Transformation from UTC to
TAI or TT is based on tables of leap seconds for dates between
1961-01-01 and (predicted) 1999-07-01, and on estimates for UT since
-390 for dates before 1961-01-01. (See "Explanatory Supplement to the
Astronomical Almanac", P. K. Seidelmann (editor), University Science
Books (1992), section 2.553).
Not all calendars have a new day start at the same time. For example,
in the Common calendar a new day starts at midnight, but in the Islamic
and Hebrew calendars a new day starts at sunset. Our calendar
conversion algorithms must deal with this somehow. For the traditional
calendars (all except
conversions are based on the integer parts of the dates only, and are
referred to noontime. The fractional part of the day is not modified.
For example, day 1 Muharram 1 A.H. (Islamic Calendar) ran from
sunset on 15 July 622 C.E. (Common Calendar) to sunset on 16 July,
so 1 Muharram 1 A.H. coincided with parts of 15 and 16 July 622 C.E.,
and 16 July 622 C.E. coincided with parts of 1 and 2 Muharram 1 A.H.
calendar function gives you the correspondence between these
calendars at noon. It shows that noon of 1 Muharram 1 A.H. coincided
with noon of 16 July 622 C.E.
See also: !jd, Astronomy and Calendars
|• General Calendar Details:|
|• Common Calendar:|
|• Julian Calendar:|
|• Gregorian Calendar:|
|• Islamic Calendar:|
|• Hebrew Calendar:|
|• Julian Day Numbers:|
|• Egyptian Calendar:|
|• Mayan Tikal Calendar:|
|• Mayan Long Count:|
|• Lunar Calendar:|
|• Latin Calendar:|
|• Time Scales:|