In current Chrome, Firefox and Safari Intl.DateTimeFormat
for the locale it-CH
(italian part of Switzerland) is wrong:
new window.Intl.DateTimeFormat('it-CH').format(new Date()) // -> "6/7/2017"
new window.Intl.DateTimeFormat('fr-CH').format(new Date()) // -> "06.07.2017"
new window.Intl.DateTimeFormat('de-CH').format(new Date()) // -> "06.07.2017"
The output of the first line is wrong. In all parts of Switzerland the format should be "dd.mm.yyyy"
Interestingly IE11 & Edge produce the correct output for the above snippet.
What is the best way to fix/patch/override the faulty implementation of window.Intl in given browsers?