demo · v130

Week Format Playground

Chrome 130 relaunches Intl.Locale's locale-info methods as functions: getWeekInfo(), getCalendars(), getHourCycles(), etc. This playground focuses on getWeekInfo() — the first day of the week, weekend start/end, and minimal days — and renders it as a live calendar strip and cross-locale comparison table.

Checking Intl.Locale.prototype.getWeekInfo…
Week days — blue border = first day of week, grey bg = weekend

Cross-locale comparison

Locale First day Weekend start Weekend end Min days in week 1
// Chrome 130: function-style Intl Locale Info API
const locale = new Intl.Locale('en-US');

// getWeekInfo() replaces the old .weekInfo accessor
const weekInfo = locale.getWeekInfo();
console.log(weekInfo.firstDay);    // 7 (Sunday)
console.log(weekInfo.weekend);     // [6, 7] (Sat, Sun)
console.log(weekInfo.minimalDays); // 1

// Also works for other getters:
locale.getCalendars();       // ["gregory"]
locale.getHourCycles();      // ["h12"]
locale.getNumberingSystems(); // ["latn"]
locale.getTimeZones();       // ["America/New_York", ...]

see also