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 CompactOption 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.
The text was updated successfully, but these errors were encountered: