Henri Sivonen

Results 373 comments of Henri Sivonen

Letting the locale affect `hour12` expansion to `hourCycle` seems required for ECMA-402 compliance. AFAICT, by the time the `[Date]TimeFormatter` constructor has done the provider-level resolution of the locale data, there...

macOS Ventura and Gnome expose a boolean system pref for this topic, so `hour12` might be relevant to support to be able to honor system preferences. I don't have test...

Looking at https://github.com/unicode-org/cldr-json/blob/80a94b0f6c3a34d6e2dc0dca8639a54babc87f94/cldr-json/cldr-core/supplemental/timeData.json#L4 , I observe: 1. The preferred cycle for each locale is either `h` or `H`, i.e. `h12` or `h23`. 2. `k` and `K` do not appear in...

> > However, from reading the ECMA-402 spec, I'm a bit surprised at how the ECMA-402 semantics are supposed to work. > > The current spec is incorrect. There's a...

> > 2. `k` and `K` do not appear in allowed cycles. `hb` and `hB` do, but I don't find a spec explaining what they mean. > > Japan has...

> Yes. `K` isn't the default hour-cycle for Japan per `/`, but when selecting `{hour: "numeric", hour12: true}`, the resolved pattern will contain `K`, see [here](https://github.com/unicode-org/cldr/blob/343bde9e7e8d6cf6f2c57e257fa4f074df970311/common/main/ja.xml#L3082). That also means it's...

> We'd have to ship both baked files in `icu_normalizer_data`, or add a `icu_normalizer_data_fast` crate. When I filed this, I meant the former, but let's proceed with the results of...

With fast ties, this affects only non-BMP input. With small tries, though, this affects input from U+1000 upwards.

> What I do in ICU unit tests is that every time I expect compare(s1, s2) to return some value, I use a test helper function that calls every possible...