icu4x
icu4x copied to clipboard
Implement flexible day periods
Flexible day periods, represented as B in UTS-35 datetime formats, represent periods of the day such as "in the morning", "in the afternoon", and so forth. These day periods are locale-dependent, and they may take into account the latitude/longitude of the user as well.
zh-TW uses flexible day periods in its core date formats, so if we don't support them in ICU4X then we won't have full i18n correctness parity with ICU4C.
"hm": "Bh:mm",
"Hm": "HH:mm",
"hms": "Bh:mm:ss",
"Hms": "HH:mm:ss",
Raising priority because this is reachable in ECMA-402: https://unicode-org.atlassian.net/browse/CLDR-17570
@nordzilla started some work on this in 2022: https://github.com/unicode-org/icu4x/pull/1227
Here's an MDN example illustrating that this is in 402: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options