Skip to content

Instantly share code, notes, and snippets.

@shisama
Created April 23, 2019 17:43
Show Gist options
  • Save shisama/2ae41f82a673c276544cfa3b0efd9ca7 to your computer and use it in GitHub Desktop.
Save shisama/2ae41f82a673c276544cfa3b0efd9ca7 to your computer and use it in GitHub Desktop.
Intl.Locale - New JavaScript Features in Node.js v12
let loc = new Intl.Locale("pl-u-hc-h12", {
calendar: 'gregory'
});
console.log(loc.language); // "pl"
console.log(loc.hourCycle); // "h12"
console.log(loc.calendar); // "gregory"
console.log(loc.toString()); // "pl-u-ca-gregory-hc-h12"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment