-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intl.DateTimeFormat error with formatRange #864
Comments
Thanks for the report. I verified that this seems to be an issue in either ICU or in how engines call ICU. The range pattern gets selected from here: https://www.unicode.org/cldr/charts/44/by_type/date_&_time.gregorian.html#153a46c24508d0d4 The selected pattern is
https://unicode.org/reports/tr35/tr35-dates.html#intervalFormats So it should change The root cause may be https://unicode-org.atlassian.net/browse/ICU-12076 CC @anba @FrankYFTang @Constellation for input on whether there is anything in the engines that could be causing this behavior or if it is indeed inside of ICU. |
Yes, this is caused by ICU. The spec actually allows this behaviour, though. FormatDateTimePattern selects the formatting options from |
Consider the following
What You Currently See
Wed, 2/14/2024 – Thu, 2/15/2024
What Is Expected
Wed, 02/14/2024 – Thu, 02/15/2024
If you call just
format()
then the output is according to the definition (2-digit
month), but when usingformatRange()
you get an incorrectmonth
output (numeric
month).It does this in all current major browser versions (Chrome, Edge, FF and Safari)
The text was updated successfully, but these errors were encountered: