2024-08-09 [04:23:04.0502] What should I read to learn why ECMA-402 `DisplayNames` has both "short" and "narrow" style when the expected data source (CLDR) seems to have only one kind of short? [08:38:55.0408] > <@hsivonen:mozilla.org> What should I read to learn why ECMA-402 `DisplayNames` has both "short" and "narrow" style when the expected data source (CLDR) seems to have only one kind of short? There's nothing forbidding engines from obeying a request for a narrow width if they have data for it, and there is data in type: "currency". In previous versions of the proposal, date fields like type: "weekday" were included, which definitely have narrow width, but type: "weekday" was removed before the proposal reached Stage 3. In Firefox 115: ``` ["long", "short", "narrow"].map((style) => new Intl.DisplayNames("es-MX", { type: "currency", style }).of("USD")) Array(3) [ "dólar estadounidense", "USD", "$" ] ``` [08:40:19.0245] Note: Chrome doesn't seem to respect `style` with `type: "currency"`? [08:56:51.0997] > <@sffc:mozilla.org> Note: Chrome doesn't seem to respect `style` with `type: "currency"`? what's the expected result? [08:59:27.0929] Chrome 127: ``` ["long", "short", "narrow"].map((style) => new Intl.DisplayNames("es-MX", { type: "currency", style }).of("USD")) Array(3) [ "dólar estadounidense", "USD", "$" ] ``` [12:17:05.0083] > <@sffc:mozilla.org> There's nothing forbidding engines from obeying a request for a narrow width if they have data for it, and there is data in type: "currency". In previous versions of the proposal, date fields like type: "weekday" were included, which definitely have narrow width, but type: "weekday" was removed before the proposal reached Stage 3. > > In Firefox 115: > > ``` > ["long", "short", "narrow"].map((style) => new Intl.DisplayNames("es-MX", { type: "currency", style }).of("USD")) > Array(3) [ "dólar estadounidense", "USD", "$" ] > ``` Thanks. So it's for currency and for the rest just the same API shape. 2024-08-10 [21:17:34.0879] In general, the definition of Long/Short/Narrow is - Long: the full name of the entity - Short: the shortest name of the entity that is not ambiguous - Narrow: the shortest name of the entity, even if ambiguous So for something like the region name, it would be valid for an implementation to return "France", "Fr.", and "F" for region FR and "Finland", "Fi.", and "F" for region FI, even though the narrow names are ambiguous with each other. 2024-08-12 [16:49:33.0624] Interesting history of the Chinese calendar, Jesuits, Galileo, and more. https://x.com/cremieuxrecueil/status/1729600511031037988?s=46&t=QSggAfTZ89VDmJRcZoeQ0A 2024-08-13 [10:35:44.0057] hi folks, trying to get some clarity on `"numeric"` format for `hour`, `minute`, and `second` in `DateTimeFormat`: is that supposed to be 1-digit or 2-digit? [10:36:15.0532] was there a recent normative change in the spec that made `"numeric"` one (1) digit and `"2-digit"` two (2) digits? [12:00:56.0120] i'll ask it a different way, i have some urgency here. by my reading `"numeric"` is specced to mean one (1) digit in ecma402 - is this a recent change? if so, what's the PR? i couldn't find it. - is this how it's always been? if so, how come all the browsers (and MDN) format `"numeric"` as two (2) digits? [12:14:13.0205] okay, i think i got my answer from ftang, which is this was implementation defined [12:18:11.0962] These styles are all hints and it is up to the implementation to pick the exact format. "Numeric" often means "a number without zero padding" but different locales do it differently based on context 2024-08-14 [01:20:51.0740] > <@sffc:mozilla.org> In general, the definition of Long/Short/Narrow is > > - Long: the full name of the entity > - Short: the shortest name of the entity that is not ambiguous > - Narrow: the shortest name of the entity, even if ambiguous > > So for something like the region name, it would be valid for an implementation to return "France", "Fr.", and "F" for region FR and "Finland", "Fi.", and "F" for region FI, even though the narrow names are ambiguous with each other. Currently all browsers use short when reqesting narrow region, so it's not clear that introducing a novel narrow behavior would be Web-compatible. [11:10:52.0451] "compliant with ECMA-402" and "Web compatible" are not always the same thing :)