JavaScript Intl.supportedValuesOf() Method

Beginner
6 min read
Updated: Nov 2026
3 examples
Static method

Definition

Intl.supportedValuesOf(key) returns an array of strings for one kind of Intl value. The key is a fixed name such as "calendar", "currency", "timeZone", "collation", "numberingSystem" or "unit".

List lengths can differ between engines, so tutorials should check known values with .includes() instead of printing the full length.

Remember
Intl.supportedValuesOf(key)

key → "calendar" | "collation" | "currency"
    | "numberingSystem" | "timeZone" | "unit"

returns a string array
throws RangeError for an unknown key

Syntax

Pass one of the allowed key strings. Check a known value with includes.

JavaScript
const cals = Intl.supportedValuesOf("calendar");
console.log("Has gregory: " + cals.includes("gregory"));
CallWhat it does
Intl.supportedValuesOf("calendar")All calendar identifiers the engine knows (for example "gregory").
Intl.supportedValuesOf("currency")Currency codes such as "USD" and "EUR".
Intl.supportedValuesOf("timeZone")IANA time zone names such as "America/New_York".
Intl.supportedValuesOf("unit")Unit identifiers used with number formatting.

A standard JavaScript static method on the Intl object: call it as Intl.supportedValuesOf(). No import required. Siblings: Intl.getCanonicalLocales(), Intl.Collator(), Intl.DateTimeFormat(), Intl.DisplayNames(), Intl.DurationFormat(), Intl.ListFormat(), Intl.Locale(), Intl.NumberFormat(), Intl.PluralRules(), Intl.RelativeTimeFormat(), Intl.Segmenter().

Library declarations
JavaScript
// ECMAScript 2022 — Intl
Intl.supportedValuesOf(key)

// key     : "calendar" | "collation" | "currency"
//          | "numberingSystem" | "timeZone" | "unit"
// returns : string[]
// throws  : RangeError for an unknown key

Parameters

ParameterDescription
keyRequired. One of: "calendar", "collation", "currency", "numberingSystem", "timeZone", "unit".

Return Value

Return ValueDescription
string[]Sorted list of supported identifiers for that key.
RangeError (thrown)The key is not one of the allowed names.

JavaScript Examples

Example 1 — Check Supported Calendars

Ask for calendars and test for the common Gregorian calendar without printing the full list.

JavaScript
const cals = Intl.supportedValuesOf("calendar");

console.log("Is array: " + Array.isArray(cals));
console.log("Has gregory: " + cals.includes("gregory"));
console.log("Has japanese: " + cals.includes("japanese"));
Try It Yourself

The Try It page first checks that Intl.supportedValuesOf exists, because it is new in ES2022. In an older browser it prints a short explanation and the output above. In current browsers it runs the code for real.

How It Works

  1. One key. "calendar" asks for calendar identifiers only.
  2. Stable checks. includes answers true or false without depending on list length.
  3. Array result. The return value is always an array of strings when the key is valid.

Example 2 — Check That USD Is Supported

Currency codes are uppercase. Test for a well-known code such as USD.

JavaScript
const list = Intl.supportedValuesOf("currency");

console.log("USD in list: " + list.includes("USD"));
console.log("EUR in list: " + list.includes("EUR"));
console.log("Type: " + typeof list);
Try It Yourself

The Try It page first checks that Intl.supportedValuesOf exists, because it is new in ES2022. In an older browser it prints a short explanation and the output above. In current browsers it runs the code for real.

How It Works

  1. Currency key. Pass "currency" to get ISO currency codes.
  2. Known codes. USD and EUR are present on every modern engine.
  3. typeof array. Arrays are objects in JavaScript, so typeof list is "object".

Example 3 — Check a Stable Time Zone Name

Time zone lists use IANA names. Check a common city zone instead of a short label like UTC.

JavaScript
const zones = Intl.supportedValuesOf("timeZone");

console.log("Has America/New_York: " + zones.includes("America/New_York"));
console.log("Has Europe/Berlin: " + zones.includes("Europe/Berlin"));
console.log("Is array: " + Array.isArray(zones));
Try It Yourself

The Try It page first checks that Intl.supportedValuesOf exists, because it is new in ES2022. In an older browser it prints a short explanation and the output above. In current browsers it runs the code for real.

How It Works

  1. IANA names. The list uses names like America/New_York, not every short alias.
  2. Boolean output. Printing includes keeps the example deterministic.
  3. Use with DateTimeFormat. Pass the same string as timeZone in date options.

Browser & Runtime Support

Intl.supportedValuesOf() is part of ES2022. Modern browsers and Node.js 18+ support it.

✓ ES2022 · Modern engines

Intl.supportedValuesOf()

Supported in Chrome 99+, Edge 99+, Firefox 93+, Safari 15.4+, Opera 85+ and Node.js 18+.

ES2022 Standard since
Google Chrome 99+ · Desktop & Mobile
Full support
Microsoft Edge 99+ · Chromium based
Full support
Mozilla Firefox 93+ · Desktop & Mobile
Full support
Apple Safari 15.4+ · macOS & iOS
Full support
Opera 85+ · Chromium based
Full support
Samsung Internet Recent versions · Android
Supported
Android WebView 99+ · Chromium based
Supported
Node.js 18+ · Server runtime
Supported
Deno Supported · JavaScript runtime
Supported
Bun Supported · JavaScript runtime
Supported
Internet Explorer No native support
Not supported
Intl.supportedValuesOf() Good

Bottom line: Guard with typeof Intl.supportedValuesOf === "function" before calling it on older engines.

Frequently Asked Questions

The allowed keys are calendar, collation, currency, numberingSystem, timeZone and unit. Any other key throws a RangeError.
Engines can ship different data packs, so the number of time zones or currencies may differ. Checking includes("USD") stays stable.
Not as the short string "UTC". Use an IANA name such as America/New_York, or format with timeZone:"UTC" on DateTimeFormat without needing it in this list.
It is an ES2022 feature. Guard older engines with typeof Intl.supportedValuesOf === "function".
A sorted array of strings for that key. You can search it with includes or map it into a UI list.

Next: Intl.Collator

Learn how to compare and sort strings with locale-aware rules.

Intl.Collator tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

11 people found this page helpful