Demo showing the use of resolvedOptions

Use resolvedOptions() for each of the three types, printing the options to the console.

JavaScript

var locale = "en-US",
    numFormat = new Intl.NumberFormat(locale),
    dateFormat = new Intl.DateTimeFormat(locale),
    collator = new Intl.Collator(locale);

// print options object to the console. Unset options are not included
var options = numFormat.resolvedOptions();
console.dirxml(options);

// access individual options
console.log("Style: " + options.style);

// same method exists for dateTime and collator, but returns different options
console.dirxml(dateFormat.resolvedOptions());
console.dirxml(collator.resolvedOptions());