v143 · javascript
Deprecate getters of Intl Locale Info
Intl Locale Info API is a Stage 3 ECMAScript TC39 proposal to enhance the Intl.Locale object by exposing Locale information, such as week data (first day in a week, weekend start day, weekend end day, minimun day in the first week), and text direction hour cycle used in the locale. https://github.com/tc39/proposal-intl-locale-info We ship our implementat
concepts
-
Intl Locale Getters
Side-by-side: pick a locale, see what the deprecated
.calendars-style getters return vs the new.getCalendars()-style methods in your browser, plus equality. -
Calendar grid
The use case that justifies the API: render a real month grid that rotates its columns and shades its weekend based on
getWeekInfo(). Try Arabic, Hebrew, Persian locales. -
Codemod helper
Paste any source file; the page rewrites each legacy getter (
.calendars,.weekInfo, etc.) into the new method form, lists every hit, and lets you copy the patched output. -
Getter vs getter matrix
For any locale, calls both the legacy property and the new method side by side. Counts matches, diffs, and properties already removed — a one-shot deprecation runway audit.
why it shipped
Intl Locale Info API advanced to Stage 3 in Stage 3 in 2021-04 TC39 and v8 ship with that in m99 But in 2022-11 TC39 meeting , TC39 decide to change getters to functions and the spec change merged in Jan 31, 2023 https://github.com/tc39/proposal-intl-locale-info/pull/67