Standard built-ins

Intl.DateTimeFormat.prototype.resolvedOptions()

Try the free JavaScript compiler

Return selected locale, calendar, numbering system, time zone and other relevant date/time options.

Formal Syntax & Structure

javascript syntaxjavascript
formatter.resolvedOptions()

Return Value

Object

Effective options.

Working Example

Example Snippetjavascript
console.log(new Intl.DateTimeFormat("en-US",{timeZone:"UTC"}).resolvedOptions().timeZone);
JavaScript Reference