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

proposal: x/text: provide an option for compact number formatting #34989

Open
nkall opened this issue Oct 18, 2019 · 1 comment
Labels
Projects
Milestone

Comments

@nkall
Copy link

@nkall nkall commented Oct 18, 2019

The Unicode Technical Standard specifies a list of long and short Compact Number Formats for use in formatting truncated versions of numbers (e.g. 35K, 2M). For reference, the JSON representation of these formats in English can be viewed here. x/text implements a lot of the standard, including currency and number formatting, but there isn't currently a way to get compact formats as described.

I suggest x/text/number be given a Compact Option which can be created with either a "long" or "short" typed argument. When this option is provided and the number formatted is suitable for compacting in that locale, the compact version should instead be returned.

@gopherbot gopherbot added this to the Proposal milestone Oct 18, 2019
@gopherbot gopherbot added the Proposal label Oct 18, 2019
@rsc

This comment has been minimized.

Copy link
Contributor

@rsc rsc commented Nov 27, 2019

/cc @mpvl

@rsc rsc added this to Incoming in Proposals Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Proposals
Incoming
3 participants
You can’t perform that action at this time.