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

Add approximately pattern #10

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

Add approximately pattern #10

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

Comments

@sffc
Copy link
Collaborator

sffc commented Apr 29, 2020

Given https://unicode-org.atlassian.net/browse/CLDR-11431, the following is how we could add the approximately pattern to Intl.NumberFormat:

new Intl.NumberFormat({
  signDisplay: "approximately"
});

Expected outputs:

Input en-US result with signDisplay: "approximately"
5 ~5
0 ~0
-0 -0
-5 -5

Alternatively, we could throw RangeError on the negative numbers, since the behavior with them is not well-defined in CLDR.

Related: #6

@littledan
Copy link
Member

@sffc This seems like a nice feature. Were you saying there are currently questions about the data quality here?

@sffc
Copy link
Collaborator Author

sffc commented May 1, 2020

@sffc This seems like a nice feature. Were you saying there are currently questions about the data quality here?

I'm working on the data quality issues upstream in https://unicode-org.atlassian.net/browse/CLDR-11431

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

sffc commented Jan 14, 2021

See #24

@sffc
Copy link
Collaborator Author

sffc commented Jan 14, 2021

2021-01-14: We agreed to use the approximately sign as the format when a range collapses down to one number, but not to expose the approximately sign as another option on signDisplay. If we want to add an approximately format in the future, it should be its own option on Intl.NumberFormat, not an overload of signDisplay.

@sffc sffc added has-consensus Has consensus and ready to implement and removed discuss Needs discussion to make progress labels Jan 14, 2021
@sffc sffc closed this as completed in a0c5b85 Apr 23, 2021
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.

2 participants