MDN self-hosted library · e01.org

Intl.DurationFormat.prototype.resolvedOptions()

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
const duration = new Intl.DurationFormat("en");
const usedOptions = duration.resolvedOptions();

usedOptions.locale; // "en"
usedOptions.numberingSystem; // "latn"
usedOptions.years; // "short"
usedOptions.yearsDisplay; // "auto"
usedOptions.style; // "short"