diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/calendarid/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/calendarid/index.md index 79a92b6b4cb5f4a..ace48b39a77cd03 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/calendarid/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/calendarid/index.md @@ -11,7 +11,7 @@ browser-compat: javascript.builtins.Temporal.PlainDate.calendarId The **`calendarId`** accessor property of {{jsxref("Temporal.PlainDate")}} instances returns a string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) used to interpret the internal ISO 8601 date. -For a list of commonly supported values, see {{jsxref("Intl/Locale/getCalendars", "Intl.Locale.prototype.getCalendars()")}}. +See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. The set accessor of `calendarId` is `undefined`. You cannot change this property directly. Use the {{jsxref("Temporal/PlainDate/withCalendar", "withCalendar()")}} method to create a new `Temporal.PlainDate` object with the desired new value. diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/from/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/from/index.md index f1628e61d47d065..c2e206f426b0d09 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/from/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/from/index.md @@ -31,7 +31,7 @@ Temporal.PlainDate.from(info, options) - An object containing the following properties (in the order they are retrieved and validated): - `calendar` {{optional_inline}} - - : A string that corresponds to the {{jsxref("Temporal/PlainDate/calendarId", "calendarId")}} property. Defaults to `"iso8601"`. All other properties are interpreted in this calendar system (unlike the {{jsxref("Temporal/PlainDate/PlainDate", "Temporal.PlainDate()")}} constructor, which interprets the values in the ISO calendar system). + - : A string that corresponds to the {{jsxref("Temporal/PlainDate/calendarId", "calendarId")}} property. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. Defaults to `"iso8601"`. All other properties are interpreted in this calendar system (unlike the {{jsxref("Temporal/PlainDate/PlainDate", "Temporal.PlainDate()")}} constructor, which interprets the values in the ISO calendar system). - `day` - : An integer that corresponds to the {{jsxref("Temporal/PlainDate/day", "day")}} property. Must be positive regardless of the `overflow` option. - `era` and `eraYear` diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/index.md index 9aca0eb73ce8e95..f8399991d461494 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/index.md @@ -30,7 +30,7 @@ YYYY-MM-DD [u-ca=calendar_id] - `DD` - : A two-digit number from `01` to `31`. The `YYYY`, `MM`, and `DD` components can be separated by `-` or nothing. - `[u-ca=calendar_id]` {{optional_inline}} - - : Replace `calendar_id` with the calendar to use. May have a _critical flag_ by prefixing the key with `!`: e.g., `[!u-ca=iso8601]`. This flag generally tells other systems that it cannot be ignored if they don't support it. The `Temporal` parser will throw an error if the annotations contain two or more calendar annotations and one of them is critical. Defaults to `[u-ca=iso8601]`. Note that the `YYYY-MM-DD` is always interpreted as an ISO 8601 calendar date and then converted to the specified calendar. + - : Replace `calendar_id` with the calendar to use. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. Defaults to `[u-ca=iso8601]`. May have a _critical flag_ by prefixing the key with `!`: e.g., `[!u-ca=iso8601]`. This flag generally tells other systems that it cannot be ignored if they don't support it. The `Temporal` parser will throw an error if the annotations contain two or more calendar annotations and one of them is critical. Note that the `YYYY-MM-DD` is always interpreted as an ISO 8601 calendar date and then converted to the specified calendar. As an input, you may optionally include the time, offset, and time zone identifier, in the same format as [`PlainDateTime`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime#rfc_9557_format), but they will be ignored. Other annotations in the `[key=value]` format are also ignored, and they must not have the critical flag. diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/plaindate/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/plaindate/index.md index 0d0ce3f0b1fcf88..311d9f691c3d766 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/plaindate/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/plaindate/index.md @@ -31,7 +31,7 @@ new Temporal.PlainDate(year, month, day, calendar) - `day` - : A number, truncated to an integer, representing the day of the month in the ISO calendar system. - `calendar` {{optional_inline}} - - : A string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) to use. Note that irrespective of the `calendar`, the `year`, `month`, and `day` must be in the ISO 8601 calendar system. Defaults to `"iso8601"`. + - : A string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) to use. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. Defaults to `"iso8601"`. Note that irrespective of the `calendar`, the `year`, `month`, and `day` must be in the ISO 8601 calendar system. ### Return value diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/withcalendar/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/withcalendar/index.md index 89dfd54d7a4bacb..4fd31cbf0118842 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/withcalendar/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/withcalendar/index.md @@ -22,7 +22,7 @@ withCalendar(calendar) ### Parameters - `calendar` - - : A string that corresponds to the {{jsxref("Temporal/PlainDate/calendarId", "calendarId")}} property. + - : A string that corresponds to the {{jsxref("Temporal/PlainDate/calendarId", "calendarId")}} property. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. ### Return value diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/calendarid/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/calendarid/index.md index c8dfbe53c67a966..ba6f863aa3b0e5c 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/calendarid/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/calendarid/index.md @@ -11,7 +11,7 @@ browser-compat: javascript.builtins.Temporal.PlainDateTime.calendarId The **`calendarId`** accessor property of {{jsxref("Temporal.PlainDateTime")}} instances returns a string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) used to interpret the internal ISO 8601 date. -For a list of commonly supported values, see {{jsxref("Intl/Locale/getCalendars", "Intl.Locale.prototype.getCalendars()")}}. +See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. The set accessor of `calendarId` is `undefined`. You cannot change this property directly. Use the {{jsxref("Temporal/PlainDateTime/withCalendar", "withCalendar()")}} method to create a new `Temporal.PlainDateTime` object with the desired new value. diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/index.md index fc7fb0f0cb24bce..9ea773a257151ef 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/index.md @@ -40,7 +40,7 @@ YYYY-MM-DD T HH:mm:ss.sssssssss [u-ca=calendar_id] - `ss.sssssssss` {{optional_inline}} - : A two-digit number from `00` to `59`. May optionally be followed by a `.` or `,` and one to nine digits. Defaults to `00`. The `HH`, `mm`, and `ss` components can be separated by `:` or nothing. You can omit either just `ss` or both `ss` and `mm`, so the time can be one of three forms: `HH`, `HH:mm`, or `HH:mm:ss.sssssssss`. - `[u-ca=calendar_id]` {{optional_inline}} - - : Replace `calendar_id` with the calendar to use. May have a _critical flag_ by prefixing the key with `!`: e.g., `[!u-ca=iso8601]`. This flag generally tells other systems that it cannot be ignored if they don't support it. The `Temporal` parser will throw an error if the annotations contain two or more calendar annotations and one of them is critical. Defaults to `[u-ca=iso8601]`. Note that the `YYYY-MM-DD` is always interpreted as an ISO 8601 calendar date and then converted to the specified calendar. + - : Replace `calendar_id` with the calendar to use. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. Defaults to `[u-ca=iso8601]`. May have a _critical flag_ by prefixing the key with `!`: e.g., `[!u-ca=iso8601]`. This flag generally tells other systems that it cannot be ignored if they don't support it. The `Temporal` parser will throw an error if the annotations contain two or more calendar annotations and one of them is critical. Note that the `YYYY-MM-DD` is always interpreted as an ISO 8601 calendar date and then converted to the specified calendar. As an input, you may optionally include the offset and time zone identifier, in the same format as [`ZonedDateTime`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime#rfc_9557_format), but they will be ignored. Note that the offset must _not_ be `Z`. Other annotations in the `[key=value]` format are also ignored, and they must not have the critical flag. diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/plaindatetime/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/plaindatetime/index.md index ffbf45dba4d01b0..5376c6a99e3fcd6 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/plaindatetime/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/plaindatetime/index.md @@ -49,7 +49,7 @@ new Temporal.PlainDateTime(year, month, day, hour, minute, second, millisecond, - `nanosecond` {{optional_inline}} - : A number, truncated to an integer, representing the nanosecond component. - `calendar` {{optional_inline}} - - : A string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) to use. Note that irrespective of the `calendar`, the `year`, `month`, and `day` must be in the ISO 8601 calendar system. Defaults to `"iso8601"`. + - : A string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) to use. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. Defaults to `"iso8601"`. Note that irrespective of the `calendar`, the `year`, `month`, and `day` must be in the ISO 8601 calendar system. ### Return value diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/withcalendar/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/withcalendar/index.md index 3c2f506af20bf12..9390014df7ab78f 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/withcalendar/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plaindatetime/withcalendar/index.md @@ -22,7 +22,7 @@ withCalendar(calendar) ### Parameters - `calendar` - - : A string that corresponds to the {{jsxref("Temporal/PlainDateTime/calendarId", "calendarId")}} property. + - : A string that corresponds to the {{jsxref("Temporal/PlainDateTime/calendarId", "calendarId")}} property. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. ### Return value diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/calendarid/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/calendarid/index.md index 145c6473e3dde37..1ef30e53d1d5bf7 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/calendarid/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/calendarid/index.md @@ -11,7 +11,7 @@ browser-compat: javascript.builtins.Temporal.PlainMonthDay.calendarId The **`calendarId`** accessor property of {{jsxref("Temporal.PlainMonthDay")}} instances returns a string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) used to interpret the internal ISO 8601 date. -For a list of commonly supported values, see {{jsxref("Intl/Locale/getCalendars", "Intl.Locale.prototype.getCalendars()")}}. +See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. The set accessor of `calendarId` is `undefined`. You cannot change this property directly. There's no obvious way to create a new `Temporal.PlainMonthDay` object with a different calendar that represents the same month-day, so you need to convert it to a {{jsxref("Temporal.PlainDate")}} object first using {{jsxref("Temporal/PlainMonthDay/toPlainDate", "toPlainDate()")}}, change the calendar, and then convert it back. diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/from/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/from/index.md index 8409747311cb795..0470716b1a5010d 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/from/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/from/index.md @@ -29,7 +29,7 @@ Temporal.PlainMonthDay.from(info, options) - An object containing the following properties (in the order they are retrieved and validated): - `calendar` {{optional_inline}} - - : A string that corresponds to the {{jsxref("Temporal/PlainMonthDay/calendarId", "calendarId")}} property. Defaults to `"iso8601"`. All other properties are interpreted in this calendar system (unlike the {{jsxref("Temporal/PlainMonthDay/PlainMonthDay", "Temporal.PlainMonthDay()")}} constructor, which interprets the values in the ISO calendar system). + - : A string that corresponds to the {{jsxref("Temporal/PlainMonthDay/calendarId", "calendarId")}} property. Defaults to `"iso8601"`. All other properties are interpreted in this calendar system (unlike the {{jsxref("Temporal/PlainMonthDay/PlainMonthDay", "Temporal.PlainMonthDay()")}} constructor, which interprets the values in the ISO calendar system). See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. - `day` - : An integer that corresponds to the {{jsxref("Temporal/PlainMonthDay/day", "day")}} property. Must be positive regardless of the `overflow` option. - `era` and `eraYear` diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/index.md index 31fb702caaf6502..0b9009ad0792594 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/index.md @@ -30,7 +30,7 @@ YYYY-MM-DD [u-ca=calendar_id] - `DD` - : A two-digit number from `01` to `31`. The `YYYY`, `MM`, and `DD` components can be separated by `-` or nothing. - `[u-ca=calendar_id]` {{optional_inline}} - - : Replace `calendar_id` with the calendar to use. May have a _critical flag_ by prefixing the key with `!`: e.g., `[!u-ca=iso8601]`. This flag generally tells other systems that it cannot be ignored if they don't support it. The `Temporal` parser will throw an error if the annotations contain two or more calendar annotations and one of them is critical. Defaults to `[u-ca=iso8601]`. Note that the `YYYY-MM-DD` is always interpreted as an ISO 8601 calendar date and then converted to the specified calendar. + - : Replace `calendar_id` with the calendar to use. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. Defaults to `[u-ca=iso8601]`. May have a _critical flag_ by prefixing the key with `!`: e.g., `[!u-ca=iso8601]`. This flag generally tells other systems that it cannot be ignored if they don't support it. The `Temporal` parser will throw an error if the annotations contain two or more calendar annotations and one of them is critical. Note that the `YYYY-MM-DD` is always interpreted as an ISO 8601 calendar date and then converted to the specified calendar. As an input, you may optionally include the time, offset, and time zone identifier, in the same format as [`PlainDateTime`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime#rfc_9557_format), but they will be ignored. Other annotations in the `[key=value]` format are also ignored, and they must not have the critical flag. diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/plainmonthday/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/plainmonthday/index.md index 881dbc81b784faf..f510936f0647743 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/plainmonthday/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plainmonthday/plainmonthday/index.md @@ -33,7 +33,7 @@ new Temporal.PlainMonthDay(month, day, calendar, referenceYear) - `day` - : A number, truncated to an integer, representing the day of the month in the ISO calendar system. - `calendar` {{optional_inline}} - - : A string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) to use. Note that irrespective of the `calendar`, the `referenceYear`, `month`, and `day` must be in the ISO 8601 calendar system. Defaults to `"iso8601"`. + - : A string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) to use. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. Defaults to `"iso8601"`. Note that irrespective of the `calendar`, the `referenceYear`, `month`, and `day` must be in the ISO 8601 calendar system. - `referenceYear` {{optional_inline}} - : A number, truncated to an integer, representing the year in the ISO calendar system. Defaults to `1972`. The same ISO month-day can represent different dates in different years with non-ISO calendars. For example, the days 2021-07-01 and 1972-07-01 may fall on different month-days in a non-Gregorian calendar, and just specifying "07-01" is insufficient to unambiguously determine a month-day in the target calendar. Therefore, you virtually always want to specify a `referenceYear` when using a non-ISO calendar. diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/calendarid/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/calendarid/index.md index 0ec08013b25b811..bf8fb25408c30d4 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/calendarid/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/calendarid/index.md @@ -11,7 +11,7 @@ browser-compat: javascript.builtins.Temporal.PlainYearMonth.calendarId The **`calendarId`** accessor property of {{jsxref("Temporal.PlainYearMonth")}} instances returns a string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) used to interpret the internal ISO 8601 date. -For a list of commonly supported values, see {{jsxref("Intl/Locale/getCalendars", "Intl.Locale.prototype.getCalendars()")}}. +See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. The set accessor of `calendarId` is `undefined`. You cannot change this property directly. There's no obvious way to create a new `Temporal.PlainYearMonth` object with a different calendar that represents the same year-month, so you need to convert it to a {{jsxref("Temporal.PlainDate")}} object first using {{jsxref("Temporal/PlainYearMonth/toPlainDate", "toPlainDate()")}}, change the calendar, and then convert it back. diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/from/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/from/index.md index 8e2216fc01b0ccb..d36893f76d43c23 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/from/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/from/index.md @@ -28,7 +28,7 @@ Temporal.PlainYearMonth.from(info, options) - An [RFC 9557](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth#rfc_9557_format) string containing a date and optionally a calendar. If the calendar is not `iso8601`, a day is required. - An object containing the following properties (in the order they are retrieved and validated): - `calendar` {{optional_inline}} - - : A string that corresponds to the {{jsxref("Temporal/PlainYearMonth/calendarId", "calendarId")}} property. Defaults to `"iso8601"`. All other properties are interpreted in this calendar system (unlike the {{jsxref("Temporal/PlainYearMonth/PlainYearMonth", "Temporal.PlainYearMonth()")}} constructor, which interprets the values in the ISO calendar system). + - : A string that corresponds to the {{jsxref("Temporal/PlainYearMonth/calendarId", "calendarId")}} property. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. Defaults to `"iso8601"`. All other properties are interpreted in this calendar system (unlike the {{jsxref("Temporal/PlainYearMonth/PlainYearMonth", "Temporal.PlainYearMonth()")}} constructor, which interprets the values in the ISO calendar system). - `era` and `eraYear` - : A string and an integer that correspond to the {{jsxref("Temporal/PlainYearMonth/era", "era")}} and {{jsxref("Temporal/PlainYearMonth/eraYear", "eraYear")}} properties. Are only used if the calendar system has eras. `era` and `eraYear` must be provided simultaneously. If they are not provided, then `year` must be provided. If all of `era`, `eraYear`, and `year` are provided, they must be consistent. - `month` diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/index.md index 080e66cf1fda901..007301c16c6fb24 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/index.md @@ -30,7 +30,7 @@ YYYY-MM-DD [u-ca=calendar_id] - `DD` {{optional_inline}} - : A two-digit number from `01` to `31`. It is required for non-ISO calendars, and optional otherwise. If omitted, the string looks like `YYYY-MM` or `YYYYMM`. Note that the reference day actually stored may be different from the one you provide, but the represented year-month is the same. See {{jsxref("Temporal/PlainYearMonth/from", "Temporal.PlainYearMonth.from()")}} for more information. The `YYYY`, `MM`, and `DD` components can be separated by `-` or nothing. - `[u-ca=calendar_id]` {{optional_inline}} - - : Replace `calendar_id` with the calendar to use. May have a _critical flag_ by prefixing the key with `!`: e.g., `[!u-ca=iso8601]`. This flag generally tells other systems that it cannot be ignored if they don't support it. The `Temporal` parser will throw an error if the annotations contain two or more calendar annotations and one of them is critical. Defaults to `[u-ca=iso8601]`. Note that the `YYYY-MM-DD` is always interpreted as an ISO 8601 calendar date and then converted to the specified calendar. + - : Replace `calendar_id` with the calendar to use. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. Defaults to `[u-ca=iso8601]`. May have a _critical flag_ by prefixing the key with `!`: e.g., `[!u-ca=iso8601]`. This flag generally tells other systems that it cannot be ignored if they don't support it. The `Temporal` parser will throw an error if the annotations contain two or more calendar annotations and one of them is critical. Note that the `YYYY-MM-DD` is always interpreted as an ISO 8601 calendar date and then converted to the specified calendar. As an input, you may optionally include the time, offset, and time zone identifier, in the same format as [`PlainDateTime`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime#rfc_9557_format), but they will be ignored. Other annotations in the `[key=value]` format are also ignored, and they must not have the critical flag. diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/plainyearmonth/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/plainyearmonth/index.md index 5a0c2b9d41873d0..dec5771b59eb3e1 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/plainyearmonth/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/plainyearmonth/plainyearmonth/index.md @@ -33,7 +33,7 @@ new Temporal.PlainYearMonth(year, month, calendar, referenceDay) - `month` - : A number, truncated to an integer, representing the month in the ISO calendar system. - `calendar` {{optional_inline}} - - : A string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) to use. Note that irrespective of the `calendar`, the `year`, `month`, and `referenceDay` must be in the ISO 8601 calendar system. Defaults to `"iso8601"`. + - : A string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) to use. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. Defaults to `"iso8601"`. Note that irrespective of the `calendar`, the `year`, `month`, and `referenceDay` must be in the ISO 8601 calendar system. - `referenceDay` - : A number, truncated to an integer, representing the day of the month in the ISO calendar system. Defaults to `1`. The same ISO year-month can represent different months on different days with non-ISO calendars. For example, the days 2021-07-01 and 2021-07-31 may fall in different months in a non-Gregorian calendar, and just specifying "2021-07" is insufficient to unambiguously determine a month in the target calendar. Therefore, you virtually always want to specify a `referenceDay` when using a non-ISO calendar. diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/calendarid/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/calendarid/index.md index 82aa16426769fb5..ef4f3c39960cc73 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/calendarid/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/calendarid/index.md @@ -11,7 +11,7 @@ browser-compat: javascript.builtins.Temporal.ZonedDateTime.calendarId The **`calendarId`** accessor property of {{jsxref("Temporal.ZonedDateTime")}} instances returns a string representing the [calendar](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars) used to interpret the internal ISO 8601 date. -For a list of commonly supported values, see {{jsxref("Intl/Locale/getCalendars", "Intl.Locale.prototype.getCalendars()")}}. +See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. The set accessor of `calendarId` is `undefined`. You cannot change this property directly. Use the {{jsxref("Temporal/ZonedDateTime/withCalendar", "withCalendar()")}} method to create a new `Temporal.ZonedDateTime` object with the desired new value. diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/index.md index 02eb270e607fe80..4ec831374c1577e 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/index.md @@ -107,7 +107,7 @@ YYYY-MM-DD T HH:mm:ss.sssssssss Z/±HH:mm [time_zone_id] [u-ca=calendar_id] - `[time_zone_id]` - : Replace `time_zone_id` with the time zone identifier (named or offset) as described above. May have a _critical flag_ by prefixing the identifier with `!`: e.g., `[!America/New_York]`. This flag generally tells other systems that it cannot be ignored if they don't support it. Note that it is required for `Temporal.ZonedDateTime.from()`: omitting it causes a `RangeError`. If you want to parse ISO 8601 / RFC 3339 strings without time zone identifier annotations, use {{jsxref("Temporal/Instant/from", "Temporal.Instant.from()")}} instead. - `[u-ca=calendar_id]` {{optional_inline}} - - : Replace `calendar_id` with the calendar to use. May have a _critical flag_ by prefixing the key with `!`: e.g., `[!u-ca=iso8601]`. This flag generally tells other systems that it cannot be ignored if they don't support it. The `Temporal` parser will throw an error if the annotations contain two or more calendar annotations and one of them is critical. Defaults to `[u-ca=iso8601]`. Note that the `YYYY-MM-DD` is always interpreted as an ISO 8601 calendar date and then converted to the specified calendar. + - : Replace `calendar_id` with the calendar to use. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. Defaults to `[u-ca=iso8601]`. May have a _critical flag_ by prefixing the key with `!`: e.g., `[!u-ca=iso8601]`. This flag generally tells other systems that it cannot be ignored if they don't support it. The `Temporal` parser will throw an error if the annotations contain two or more calendar annotations and one of them is critical. Note that the `YYYY-MM-DD` is always interpreted as an ISO 8601 calendar date and then converted to the specified calendar. As an input, other annotations in the `[key=value]` format are ignored, and they must not have the critical flag. diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/withcalendar/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/withcalendar/index.md index 54a3fdd3f467ddb..8bb1168f0b1810c 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/withcalendar/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/withcalendar/index.md @@ -22,7 +22,7 @@ withCalendar(calendar) ### Parameters - `calendar` - - : A string that corresponds to the {{jsxref("Temporal/ZonedDateTime/calendarId", "calendarId")}} property. + - : A string that corresponds to the {{jsxref("Temporal/ZonedDateTime/calendarId", "calendarId")}} property. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. ### Return value diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/zoneddatetime/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/zoneddatetime/index.md index 6407341f78014f4..e7fee3c46937518 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/zoneddatetime/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/zoneddatetime/index.md @@ -29,7 +29,7 @@ new Temporal.ZonedDateTime(epochNanoseconds, timeZone, calendar) - `timeZone` - : A string that corresponds to the {{jsxref("Temporal/ZonedDateTime/timeZoneId", "timeZoneId")}} property. Unlike all other `Temporal` APIs, it must be a valid time zone identifier (either named or offset) as-is, and cannot be a `Temporal.ZonedDateTime` instance or a date-time string. - `calendar` {{optional_inline}} - - : A string that corresponds to the {{jsxref("Temporal/ZonedDateTime/calendarId", "calendarId")}} property. Defaults to `"iso8601"`. + - : A string that corresponds to the {{jsxref("Temporal/ZonedDateTime/calendarId", "calendarId")}} property. See [`Intl.supportedValuesOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types) for a list of commonly supported calendar types. Defaults to `"iso8601"`. ### Return value