Bug 234830 - Intl.DateTimeFormat dateStyle: medium has 'at' between date and time when it should not
Summary: Intl.DateTimeFormat dateStyle: medium has 'at' between date and time when it ...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-03 14:34 PST by jeanne.waldman
Modified: 2022-01-03 21:31 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jeanne.waldman 2022-01-03 14:34:40 PST
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}",
Comment 1 Yusuke Suzuki 2022-01-03 21:30:58 PST
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
Comment 2 Radar WebKit Bug Importer 2022-01-03 21:31:54 PST
<rdar://problem/87077451>