Compact number formats for NumberFormatter

Number:rdar://FB9950508 Date Originated:2022-03-08
Status:Open Resolved:
Product:Foundation Product Version:
Classification:Suggestion Reproducible:
The `Foundation` framework and its class `NumberFormatter` provide various styles (e.g. decimal, percent, scientific, spellOut or currency) but no compact style. A compact decimal number formatting would convert 1000 into 1K or 1100000 into 1.1M which is a common requirement for app developers.

A pull request containing a draft implementation:

It would be great if Foundation.NumberFormatter can provide handling for such compact styles out-of-the-box.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!