Bug 1864612 Comment 13 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to André Bargull [:anba] from comment #2)
> `new Intl.DateTimeFormat("sv-SE", {}).format(0)` returns:
> 
> | ICU73/CLDR43 | ICU74/CLDR44 |
> |---|---|
> |`"1970-01-01"` | `"1970-1-1"` |
> 
> (`sv-SE` locale because of misuses promoted by code like this one: <https://stackoverflow.com/questions/25050034/get-iso-8601-using-intl-datetimeformat>.)
> 
> A correct way to print the date in ISO-style is for example: `new Date(0).toISOString().split("T")[0]`.

This would be a good addition to the `locale-compat` test in https://github.com/web-platform-tests/wpt/tree/master/ecmascript.
(In reply to André Bargull [:anba] from comment #2)
> `new Intl.DateTimeFormat("sv-SE", {}).format(0)` returns:
> 
> | ICU73/CLDR43 | ICU74/CLDR44 |
> |---|---|
> |`"1970-01-01"` | `"1970-1-1"` |
> 
> (`sv-SE` locale because of misuses promoted by code like this one: <https://stackoverflow.com/questions/25050034/get-iso-8601-using-intl-datetimeformat>.)
> 
> A correct way to print the date in ISO-style is for example: `new Date(0).toISOString().split("T")[0]`.

This would be a good addition to the `locale-compat` test in https://github.com/web-platform-tests/wpt/tree/master/ecmascript. PR: https://github.com/web-platform-tests/wpt/pull/43257

Back to Bug 1864612 Comment 13