Locale-aware NSNumberFormatter subclass for formatting compact numbers (e.g. "12K" for 12,000).
C Objective-C Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
DSShortNumberFormatter.h
DSShortNumberFormatter.m
Makefile
README.md

README.md

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.