Localized short style number formatting

Originator:jeff
Number:rdar://42899977 Date Originated:August 3 2018, 10:57 AM
Status: Resolved:
Product:iOS + SDK (Foundation) Product Version:
Classification: Reproducible:
 
Please add a way create a localized formatted string for a number using a short style (presumably with NSNumberFormatter).

For example, with the en_US locale, formatting the number 1_013_000_000_000 would result in "1.013T". Ideally formatting the number 1_013_123_456_789 this way would also result in "1.013T".

For Chinese, formatting 1_000 would probably result in "千".

This request was inspired by how the Stocks app formats the market cap number (at least for en_US -- I'm not very familiar with how other locales work, which is exactly why I would like a method to do this for me).

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!