?
u
/
p
1-9
0
`
This section, Calendar Types, is present in ECMA-402 but is slated to move to ECMA-262 as part of the Temporal proposal.
This proposal re-adds the section to ECMA-402, but with additional requirements for Intl-supporting implementations, beyond those specified in
This specification identifies calendars using a calendar type as defined by Unicode Technical Standard #35 Part 4 Dates, Section 2 Calendar Elements. Their canonical form is a string containing only Unicode Basic Latin lowercase letters (U+0061 LATIN SMALL LETTER A through U+007A LATIN SMALL LETTER Z) with zero or more medial hyphens (U+002D HYPHEN-MINUS).
The either both or neither of the Calendar Type value of every row of
This definition supersedes the definition provided in
Calendar Type | Description and implementation notes |
---|---|
Thai Buddhist calendar, proleptic. Month numbers, month codes, and days are the same as in the ISO 8601 calendar, but the epoch year is different. There is one era. | |
Traditional Chinese calendar, proleptic. Similar lunisolar algorithm to |
|
Coptic calendar, proleptic. Similar solar algorithm to |
|
Traditional Korean calendar, proleptic. Similar lunisolar algorithm to |
|
Ethiopic calendar, Amete Alem, proleptic. Similar solar algorithm to |
|
Ethiopic calendar, Amete Mihret, proleptic. Similar solar algorithm to |
|
Alias for |
|
Gregorian calendar, proleptic. Solar calendar almost identical to the ISO 8601 calendar, except that it does not define week numbering and it contains two eras, one before the epoch year. | |
Hebrew calendar, proleptic. Lunisolar calendar with one leap month inserted after month 5. There is one era. | |
Indian national (or Śaka) calendar, proleptic. Solar calendar with one era. | |
Hijri calendar, proleptic, tabular/rule-based with leap years 2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29 in the 30-year cycle, and civil epoch (Friday July 16, 622 Julian / 0622-07-19 ISO) | |
Hijri calendar, proleptic, tabular/rule-based with leap years 2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29 in the 30-year cycle, and astronomical epoch (Thursday July 15, 622 Julian / 0622-07-18 ISO) | |
Hijri calendar, proleptic, Umm al-Qura. Lunisolar calendar using KACST-calculated months from the start of 1300 AH to the end of 1600 AH and falls back to |
|
Deprecated alias for |
|
ISO 8601 calendar. Fully specified in |
|
Japanese Imperial calendar, era system hybridised with |
|
Persian (or Solar Hijri) calendar, proleptic. There is one era. | |
Republic of China (or Minguo) calendar, proleptic. Month numbers, month codes, and days are the same as in the ISO 8601 calendar, but the epoch year is different. There are two eras, one before the epoch year and one after. |
[...]
The abstract operation CreateDateTimeFormat takes arguments newTarget (a
[...]
The value of the [[LocaleData]] internal slot is
The abstract operation CalendarSupportsEra takes argument calendar (a
Calendar | Era | Aliases | Minimum eraYear | Maximum eraYear |
---|---|---|---|---|
-∞ | +∞ | |||
-∞ | +∞ | |||
1 | +∞ | |||
-∞ | 5500 | |||
-∞ | +∞ | |||
1 | +∞ | |||
1 | +∞ | |||
-∞ | +∞ | |||
-∞ | +∞ | |||
1 | +∞ | |||
1 | +∞ | |||
1 | +∞ | |||
1 | +∞ | |||
1 | +∞ | |||
1 | +∞ | |||
1 | +∞ | |||
1 | 31 | |||
1 | 64 | |||
1 | 15 | |||
1 | 45 | |||
1 | 1868 | |||
1 | +∞ | |||
-∞ | +∞ | |||
1 | +∞ | |||
1 | +∞ |
The abstract operation CanonicalizeEraInCalendar takes arguments calendar (a
The abstract operation IsValidMonthCodeForCalendar takes arguments calendar (a
Calendar | Additional Month Codes |
---|---|
The abstract operation IsValidEraYearForCalendar takes arguments calendar (a
The abstract operation CalendarDateEra takes arguments calendar (a
The abstract operation CalendarDateEraYear takes arguments calendar (a
The abstract operation CalendarDateArithmeticYear takes arguments calendar (a
Calendar | Epoch ISO Year |
---|---|
-543 | |
0 | |
283 | |
0 | |
7 | |
-5492 | |
0 | |
-3761 | |
78 | |
621 | |
621 | |
621 | |
0 | |
621 | |
1911 |
A Calendar Date Record is a
Calendar Date Records have the fields listed in
This definition supersedes the one in
Field Name | Value | Meaning |
---|---|---|
[[Era]] | a String or |
A lowercase String value representing the date's era, or The value of this field for a |
[[EraYear]] | an |
The ordinal position of the date's year within its era, or The value of this field for a
Era years are 1-indexed for many calendars, but not all (e.g., the eras of the Burmese calendar each start with a year 0). Years can also advance opposite the flow of time (as for BCE years in the Gregorian calendar).
|
[[Year]] | an |
The date's year relative to the first day of a calendar-specific "epoch year". The value of this field for a The year is relative to the first day of the calendar's epoch year, so if the epoch era starts in the middle of the year, the year will be the same value before and after the start date of the era. |
[[Month]] | a positive |
The 1-based ordinal position of the date's month within its year.
When the number of months in a year of the calendar is variable, a different value can be returned for dates that are part of the same month in different years. For example, in the Hebrew calendar, 1 Nisan 5781 is associated with value 7 while 1 Nisan 5782 is associated with value 8 because 5782 is a leap year and Nisan follows the insertion of Adar I.
|
[[MonthCode]] | a String |
The month code of the date's month. The month code for a month that is not a leap month and whose 1-based ordinal position in a common year of the calendar (i.e., a year that is not a leap year) is n should be the
For example, in the Hebrew calendar, the month code of Adar (and Adar II, in leap years) is |
[[Day]] | a positive |
The 1-based ordinal position of the date's day within its month. |
[[DayOfWeek]] | a positive |
The day of the week corresponding to the date. The value should be 1-based, where 1 is the day corresponding to Monday in the given calendar. |
[[DayOfYear]] | a positive |
The 1-based ordinal position of the date's day within its year. |
[[WeekOfYear]] | a |
The date's calendar week of year, and the corresponding week calendar year. The The
Usually the The
Currently, of the calendars supported in this specification, only |
[[DaysInWeek]] | a positive |
The number of days in the date's week. |
[[DaysInMonth]] | a positive |
The number of days in the date's month. |
[[DaysInYear]] | a positive |
The number of days in the date's year. |
[[MonthsInYear]] | a positive |
The number of months in the date's year. |
[[InLeapYear]] | a Boolean |
A "leap year" is a year that contains more days than other years (for solar or lunar calendars) or more months than other years (for lunisolar calendars like Hebrew or Chinese).
Some calendars, especially lunisolar ones, have further variation in year length that is not represented in the output of this operation (e.g., the Hebrew calendar includes common years with 353, 354, or 355 days and leap years with 383, 384, or 385 days).
|
The
This definition supersedes the definition provided in
It performs the following steps when called:
The
This definition supersedes the definition provided in
It performs the following steps when called:
The
This definition supersedes the definition provided in
It performs the following steps when called:
The
This definition supersedes the definition provided in
It performs the following steps when called:
The
This definition supersedes the definition provided in
It performs the following steps when called:
© 2025 Google, Ecma International
All Software contained in this document ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://ecma-international.org/memento/codeofconduct.htm FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.