Reputation: 152095
Where can the official list of Date.prototype.toLocaleDateString formats be found? It's not linked from that MDN page, and the accepted answer to this confusingly phrased question lists a different set of formats. The CLDR database is hard to consume.
What I want is a simple map, like the one below:
const date = new Date();
for (const locale of ['en-US', 'en-GB', 'en-CA'])
console.log(locale, '=>', date.toLocaleDateString(locale, { }));
Bonus points for passing { month: 'short' }
instead of an empty options object.
Upvotes: 8
Views: 9304
Reputation: 170
Here is the List I found, not exhaustive though.
EDITED: a more comprehensive list https://gist.github.com/mlconnor/1887156
Upvotes: 1