?
u
/
p
1-9
This proposal exposes Locale information, such as week data (first day in a week, weekend start day, weekend end day, minimun day in the first week), hour cycle used in the locale, measurement system used in the locale. See the README for more context.
The abstract operation CreateArrayFromListOrRestricted takes arguments list (a
The abstract operation CalendarsOfLocale takes argument loc (an Intl.Locale) and returns an Array. It performs the following steps when called:
The abstract operation CollationsOfLocale takes argument loc (an Intl.Locale) and returns an Array. It performs the following steps when called:
The abstract operation HourCyclesOfLocale takes argument loc (an Intl.Locale) and returns an Array. It performs the following steps when called:
The abstract operation NumberingSystemsOfLocale takes argument loc (an Intl.Locale) and returns an Array. It performs the following steps when called:
The abstract operation TimeZonesOfLocale takes argument loc (an Intl.Locale) and returns an Array. It performs the following steps when called:
The abstract operation CharacterDirectionOfLocale takes argument loc (an Intl.Locale) and returns
The abstract operation WeekdayToString takes argument fw (a String) and returns a String. It performs the following steps when called:
Weekday | String | Value |
---|---|---|
The abstract operation StringToWeekdayValue takes argument fw (a String) and returns an
The abstract operation WeekInfoOfLocale takes argument loc (an Intl.Locale) and returns a
Field Name | Value | Meaning |
---|---|---|
[[FirstDay]] | The weekday value indicating which day of the week is considered the 'first' day, for calendar purposes. | |
[[Weekend]] | A |
The list of weekday values indicating which days of the week are considered as part of the 'weekend', for calendar purposes. Notice that the number of days in the weekend are different in each locale and may not be contiguous. |
[[MinimalDays]] | The minimal days required in the first week of a month or year, for calendar purposes. |
The Locale
When the Intl.Locale
function is called with an argument tag and an optional argument options, the following steps are taken:
type
type
type
type
The Intl.Locale
The value of the [[RelevantExtensionKeys]] internal slot is «
Intl.Locale.prototype.firstDayOfWeek
is an
When the getCalendars
method is called, the following steps are taken:
When the getCollations
method is called, the following steps are taken:
When the getHourCycles
method is called, the following steps are taken:
When the getNumberingSystems
method is called, the following steps are taken:
When the getTimeZones
method is called, the following steps are taken:
When the getTextInfo
method is called, the following steps are taken:
When the getWeekInfo
method is called, the following steps are taken:
Intl.Locale instances are
Intl.Locale instances have an [[InitializedLocale]] internal slot.
Intl.Locale instances also have several internal slots that are computed by the
The following aspects of the ECMAScript 2022 Internationalization API Specification are implementation dependent:
© 2024 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.