Skip to content
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

Range with negative values #11

Closed
sffc opened this issue Apr 29, 2020 · 3 comments
Closed

Range with negative values #11

sffc opened this issue Apr 29, 2020 · 3 comments
Labels
has-consensus Has consensus and ready to implement

Comments

@sffc
Copy link
Collaborator

sffc commented Apr 29, 2020

I think we should throw RangeError when either of the inputs to formatRange() is negative.

new Intl.NumberFormat().formatRange(-5, -3);  // RangeError

CLDR's number range data is very limited and does not cover this case in a cohesive way. Better to forbid it, and we can add it later if we need to.

@sffc sffc added the discuss Needs discussion to make progress label Oct 8, 2020
@sffc
Copy link
Collaborator Author

sffc commented Oct 8, 2020

Possible use cases:

@sffc
Copy link
Collaborator Author

sffc commented Oct 8, 2020

2020-10-08: We'll allow negative numbers. Adopt current behavior for negative plurals as well (always return "other").

@sffc sffc added has-consensus Has consensus and ready to implement and removed discuss Needs discussion to make progress labels Oct 8, 2020
@sffc
Copy link
Collaborator Author

sffc commented Oct 8, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-consensus Has consensus and ready to implement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant