console.log( Intl.supportedValuesOf('calendar') );
// 出力例:
// (18) ['buddhist', 'chinese', 'coptic', 'dangi', 'ethioaa', 'ethiopic', 'gregory', 'hebrew', 'indian', 'islamic', 'islamic-civil', 'islamic-rgsa', 'islamic-tbla', 'islamic-umalqura', 'iso8601', 'japanese', 'persian', 'roc']
console.log( Intl.supportedValuesOf('collation') );
// 出力例:
// (10) ['compat', 'emoji', 'eor', 'phonebk', 'pinyin', 'searchjl', 'stroke', 'trad', 'unihan', 'zhuyin']
console.log( Intl.supportedValuesOf('currency') );
// 出力例:
// (159) [ … 'AUD' … 'CAD' … 'CHF' … 'EUR' … 'GBP' … 'JPY' … 'NZD' … 'USD' … 'ZAR' … ]
console.log( Intl.supportedValuesOf('numberingSystem') );
// 出力例:
// (69) ['adlm', 'ahom', 'arab', 'arabext', 'bali', 'beng', 'bhks', 'brah', 'cakm', 'cham', 'deva', 'diak', 'fullwide', 'gong', 'gonm', 'gujr', 'guru', 'hanidec', 'hmng', 'hmnp', 'java', 'kali', 'kawi', 'khmr', 'knda', 'lana', 'lanatham', 'laoo', 'latn', 'lepc', 'limb', 'mathbold', 'mathdbl', 'mathmono', 'mathsanb', 'mathsans', 'mlym', 'modi', 'mong', 'mroo', 'mtei', 'mymr', 'mymrshan', 'mymrtlng', 'nagm', 'newa', 'nkoo', 'olck', 'orya', 'osma', 'rohg', 'saur', 'segment', 'shrd', 'sind', 'sinh', 'sora', 'sund', 'takr', 'talu', 'tamldec', 'telu', 'thai', 'tibt', 'tirh', 'tnsa', 'vaii', 'wara', 'wcho']
console.log( Intl.supportedValuesOf('timeZone') );
// 出力例:
// (429) [
// …
// (抜粋)
// 'Africa/Cairo',
// 'Africa/Kinshasa',
// 'Africa/Luanda',
// 'Africa/Nairobi',
// 'America/Los_Angeles',
// 'America/New_York',
// 'America/Whitehorse',
// 'Antarctica/Syowa',
// 'Arctic/Longyearbyen',
// 'Asia/Tokyo',
// 'Atlantic/St_Helena',
// 'Australia/Melbourne',
// 'Australia/Sydney',
// 'Europe/Berlin',
// 'Europe/London',
// 'Europe/Paris',
// 'Indian/Christmas',
// 'Pacific/Guam',
// 'Pacific/Honolulu',
// 'Pacific/Saipan',
// …
// ]
console.log( Intl.supportedValuesOf('unit') );
// 出力例:
// (45) ['acre', 'bit', 'byte', 'celsius', 'centimeter', 'day', 'degree', 'fahrenheit', 'fluid-ounce', 'foot', 'gallon', 'gigabit', 'gigabyte', 'gram', 'hectare', 'hour', 'inch', 'kilobit', 'kilobyte', 'kilogram', 'kilometer', 'liter', 'megabit', 'megabyte', 'meter', 'microsecond', 'mile', 'mile-scandinavian', 'milliliter', 'millimeter', 'millisecond', 'minute', 'month', 'nanosecond', 'ounce', 'percent', 'petabyte', 'pound', 'second', 'stone', 'terabit', 'terabyte', 'week', 'yard', 'year']
try {
console.log( Intl.supportedValuesOf('NG') );
} catch(e) {
console.log(e); // 例外:RangeError: Invalid key : NG
}