Skip to content

Locale-aware NSNumberFormatter subclass for formatting compact numbers (e.g. "12K" for 12,000).

Notifications You must be signed in to change notification settings

WizardMac/DSShortNumberFormatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSShortNumberFormatter

Locale-aware NSNumberFormatter subclass for formatting compact numbers (e.g. "12K" for 12,000).

This library requires a copy of the Unicode Common Locale Data Repository (CLDR):

http://cldr.unicode.org/index/downloads

Once you download and unzip a release, edit the Makefile in this directory to point to the CLDR "core" directory. Then type "make" to generate a patterns.plist file.

Now you can install by copying DSShortNumberFormatter.m, DSShortNumberFormatter.h, and patterns.plist into your Xcode project.

Usage is the same as a normal NSNumberFormatter.

About

Locale-aware NSNumberFormatter subclass for formatting compact numbers (e.g. "12K" for 12,000).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published