Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

Inconsistent format - option weekday: 'long' between Intl.DateTimeFormat and toLocaleDateString #39

Open
brookabyss opened this issue Jan 24, 2020 · 0 comments

Comments

@brookabyss
Copy link

brookabyss commented Jan 24, 2020

if I use toLocaleDateString on polyfilled method with weekday option I get an incorrect date format
new Date().toLocaleDateString([], {
timeZone: undefined,
weekday: 'long'
})
"‎Thursday‎, ‎1‎ ‎23‎, ‎2020"

new Intl.DateTimeFormat([], {
timeZone: undefined,
weekday: 'long'
}).format(new Date())
"‎Thursday"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant