Bug 234830
Summary: | Intl.DateTimeFormat dateStyle: medium has 'at' between date and time when it should not | ||
---|---|---|---|
Product: | WebKit | Reporter: | jeanne.waldman |
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | mmaxfield, webkit-bug-importer, ysuzuki |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 15 | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
jeanne.waldman
new Intl.DateTimeFormat('en-US', {dateStyle:'medium', timeStyle:'short'}).format(new Date());
Jan 3, 2022 at 2:26 PM
In Chrome and Firefox it is
'Jan 3, 2022, 2:33 PM'
CLDR locale data is this:
"dateTimeFormats": {
"full": "{1} 'at' {0}",
"long": "{1} 'at' {0}",
"medium": "{1}, {0}",
"short": "{1}, {0}",
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Yusuke Suzuki
Thanks,
ECMA402 does not require 1:1 CLDR conformance. Intl.DateTimeFormat will generate reasonable results for each platforms.
In Apple platforms, we are using AppleICU, which is customized fork of ICU, and it has various extensions (some features that only exists on AppleICU, and some CLDR tweaks based on Apple HI etc.).
And AppleICU intentionally uses "at" here to follow Apple HI.
https://github.com/apple-oss-distributions/ICU/blob/ICU-66112/icuSources/data/locales/en.txt#L230
Radar WebKit Bug Importer
<rdar://problem/87077451>