icu4x icon indicating copy to clipboard operation
icu4x copied to clipboard

Implement flexible day periods

Open sffc opened this issue 4 years ago • 3 comments

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.

sffc avatar Feb 09 '21 04:02 sffc

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",

sffc avatar Nov 20 '23 18:11 sffc

Raising priority because this is reachable in ECMA-402: https://unicode-org.atlassian.net/browse/CLDR-17570

sffc avatar Mar 10 '25 18:03 sffc

@nordzilla started some work on this in 2022: https://github.com/unicode-org/icu4x/pull/1227

sffc avatar May 06 '25 20:05 sffc

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

sffc avatar Jun 18 '25 15:06 sffc