browser-compat-data icon indicating copy to clipboard operation
browser-compat-data copied to clipboard

Add `Intl.supportedValuesOf()` subfeatures

Open caugner opened this issue 7 months ago • 1 comments

Summary

Adds subfeatures for Intl.supportedValuesOf() for each accepted value (cf. the spec), and a nested non-standard behavioral subfeature timeZone.includes_UTC to account for the behavioral difference between Chrome and Firefox/Safari.

Test results and supporting details

To confirm support of the subfeatures, I tested this JSBin in Chrome 99, Firefox 93, and Safari 15.6 (assuming behavior hadn't changed since 15.4), and I tested the following in Deno 1.19 and Node 18.0.0:

for (const value of ["calendar", "collation", "currency", "numberingSystem", "timeZone", "unit"]) {
  const output = Intl.supportedValuesOf(value);
  console.log(value + ": " + (Array.isArray(output) && output.length > 0 ? "OK" : JSON.stringify(output)));
}

To check support for the timeZone.includes_UTC subfeature, I manually executed Intl.supportedValuesOf('timeZone').includes('UTC') in Chrome 137, Deno 1.19.0 + 2.3.6, Firefox 93, Node.js 18.0.0 + 24.2.0, and Safari 15.6.

Related issues

Fixes https://github.com/mdn/browser-compat-data/issues/25828.

caugner avatar Jun 13 '25 15:06 caugner

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

github-actions[bot] avatar Jun 13 '25 15:06 github-actions[bot]