-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What settings to include for range formatting? #6
Comments
I can understand why someone might want to play with I'm having trouble understanding when you'd want to mess with |
FYI: with AUTO in ICU, the decision on whether to collapse prefixes/suffixes could depend on the locale, but also on the symbols. For example:
However, an implementation could choose to use different results:
|
Tentative conclusion from 402 meeting:
|
Relevant CLDR ticket: https://unicode-org.atlassian.net/browse/CLDR-11431 |
I would like to consider a world in which we have let nf = new Intl.NumberFormat("en" /* , { signDisplay: "auto" } */);
nf.format(-3); // "-3"
nf.format(3); // "3"
nf.formatRange(3, 5); // "3 – 5"
nf.formatRange(3, 3); // "~3"
let nf = new Intl.NumberFormat("en", { signDisplay: "approximately" });
nf.format(-3); // RangeError
nf.format(3); // "~3"
nf.formatRange(3, 5); // "3 – 5"
nf.formatRange(3, 3); // "~3"
let nf = new Intl.NumberFormat("en", { signDisplay: "negative" });
nf.format(-3); // "-3"
nf.format(3); // "3"
nf.formatRange(3, 5); // "3 – 5"
nf.formatRange(3, 3); // "3" In this frame of reference, I think it might be okay to allow APPROXIMATELY to be the default identity fallback behavior in formatRange. |
I think it needs to be with https://github.com/tc39/proposal-Number.range having the same opening and closing interval semantics |
@septs intl range doesn't have same semantics with programmatic number range. |
I don't believe there is anything actionable remaining on this ticket. We decided in #6 (comment) to not bubble up the two range formatting options from ICU. Discussion on the approximately sign is covered in #10. I will therefore close this issue. |
ICU4J has a number of settings for range formatting:
https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/number/NumberRangeFormatterSettings.html
Do we want to add those options to ECMA-402, or just stick with the defaults?
@romulocintra
The text was updated successfully, but these errors were encountered: