Skip to Content
Platform.Ontology

Intl and locale formatting quirks

Reads Intl resolved options and formatting outputs for many locales and calendars.

Used to track youGraphics and fingerprintingJS engineWeb browsersWhen the page loads

In one line

Can check language, calendar and number format settings to spot your browser build

Reads Intl resolved options and formatting outputs for many locales and calendars.

Beyond timezone and language, ICU data version, supported calendars and numbering systems differ per browser build and OS, enabling version and cloak detection.

What it can and can't do

What the user does: Nothing. It happens when the page loads

It can

  • Test how your browser formats dates, numbers and money in many languages
  • Learn which calendars and numbering systems it supports
  • Learn your browser build and system from the differences
  • Spot tools that fake your language or time zone

It cannot

  • See what you typed or saved
  • Ask permission first
  • Know who you are by itself
  • Tell your exact location, only your language and time zone settings

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported242013-01-10None
EdgeSupported122015-07-29None
FirefoxSupported292014-04-29None
SafariSupported102016-09-20None
Safari on iPhoneSupported102016-09-13None
Chrome on AndroidSupported252013-02-27None
Samsung InternetSupported1.52013-09-25None

How a site asks for it

APIIntl.DateTimeFormat().resolvedOptions(); Intl.supportedValuesOf(); toLocaleString(); Intl.DisplayNames
Browser compat keysjavascript.builtins.Intl.DateTimeFormat.resolvedOptions
How access is grantednone
What the user seesNot listed
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsNot listed
How to take it backNot listed
Inside an iframeNot listed

Typical flow

  1. Read resolvedOptions.timeZone, locale, calendar, numberingSystem
  2. Format a fixed date in a dozen locales
  3. Compare ICU outputs

Data you get

What comes back: About 10 strings plus formatted samples
Shape: object

FieldTypeUnitRangePrecision
timeZonestringIANAabout 420 zonesexact
calendarenumNonegregory, buddhist, ...exact
numberingSystemenumNonelatn, arab, ...exact

Technical limits

  • Timezone also available via Date, so not an extra bit alone

The story

What it is

A script reads how your browser formats dates, numbers and languages to learn your locale and engine details.

For you

You never see it. Sites use it to show prices, dates and numbers the way you expect, like 1,000.50 or 1.000,50. A quieter side effect is that the output reveals your region, calendar and browser.

For makers

Shops and apps need it to show correct local formats. Fraud tools compare your formats with your IP location, and trackers add them to a device ID.

Where you see it

TypeExampleApps
shoppingA store shows prices in your currency with the right commas and symbols.Amazon, IKEA
travelA booking site shows dates in your local order, day then month or month then day.Booking.com, Airbnb
securityA bank notices a login claiming a Japanese locale from an IP in another country and asks extra questions.None named
analyticsA fingerprint library records the time zone and calendar your browser reports.FingerprintJS
adsAn ad network targets by language and region read from locale settings.None named
gamesA browser game with a leaderboard shows scores and dates in your local format.None named
newsA news site picks the right language edition from locale data.None named

Risks

  • Reveals region and language
  • Adds to a device ID

What the platform says

  • MDN: Intl. Built in tools that format dates, numbers and text correctly for each language and region.

Good uses and abuse

Legitimate uses

  • Format dates and numbers locally

Known abuse

  • Locale and ICU version pinning, VPN versus timezone mismatch

Scores

ScoreValueMeaning
Sensitivity3 of 5How revealing the data is
Utility2 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits4Rough identifying entropy, when known

Sources

How well checked: Based on official documentation.

On this page