Intl Enumeration API�for Stage 1
Frank Yung-Fong Tang / 譚永鋒� ftang@google.com
June 3, 2020
Charter of “Intl Enumeration API”
List supported values of options in pre-existing ECMA 402 API.
Motivation / Background
Scope
High-level API
Find out the supported calendars
Intl.getSupportedCalendars()�// ['buddhist', 'chinese', 'coptic', 'dangi', 'ethioaa',�// 'ethiopic', 'gregory', 'hebrew', 'indian', �// ...�// 'persian', 'roc', 'islamicc'];
Find out the supported currencies
Intl.getSupportedCurrencies()
// ['AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', �// ...�// 'SVC', 'XDR', 'XSU', 'ZWL'];
Find out the supported numbering systems
Intl.getSupportedNumberingSystems()
// ['adlm', 'ahom', 'arab', 'arabext', 'bali', 'beng',�// 'bhks', 'brah', 'cakm', 'cham', 'deva', 'fullwide',�// …�// 'thai', 'tibt', 'tirh', 'vaii', 'wara', 'wcho'];
Find out the supported time zones
Intl.getSupportedTimeZones()
// ['Africa/Abidjan', 'Africa/Accra', �// 'Africa/Addis_Ababa', 'Africa/Algiers',�// 'Africa/Asmera', 'Africa/Bamako', 'Africa/Bangui',�// …�// 'Pacific/Truk', 'Pacific/Wake', 'Pacific/Wallis'];
Find out the supported units
Intl.getSupportedUnits()
// ['acre', 'bit', 'byte', 'celsius', 'centimeter',�// 'day', 'degree', 'fahrenheit', 'fluid-ounce', �// 'foot', 'gallon',�// …�// 'terabit', 'terabyte', 'week', 'yard', 'year'];
Possible Changes / Enhancements in Stage 1
Potential Concerns
Polyfill
Request for TC39
ECMA402 2020-5-21 Monthly Meeting
Stage 1 Advancement
Agree to bring to TC39 for stage 1 advancement discussion
Stage 1 Entrance Criteria
Frank Yung-Fong Tang
Previous slides
Used with Temporal / Intl.DateTimeFormat
Fingerprinting
Will move under tc39