A simple subclass of NSNumberFormatter that adds an ordinal to a number. e.g. 1st, 2nd, 110th.
It will also strip out any trailing text, so a number can be entered with or without an ordinal.
Released under the Simplified BSD Licence. See the included LICENCE.txt file for the actual license.
There are two branches to this repository. master and production
The master branch contains the class extension files as well as an Xcode project that shows how to use the formatter. This is the branch that further development of the class should be performed on.
The production branch is the one to use if you want to use git submodules to use the formatter in other projects. This will only contain the class files themselves without the Xcode project and the example code. This is preferable as it will keep your subdirectories clear of any code that is unnecessary to your working project.
Changes made to the master branch will be propagated across to the production branch so it will always remain current
To add the production branch rather than the master branch as as submodule, simply use the -b flag:
git submodule add -b production git://github.com/Abizern/ADNOrdinalNumberFormatter.git
To keep up to date with the latest changes, `cd` into the directory that contains this submodule and pull the newest changes in as usual
git pull origin
Sometimes, there may be artefacts left over when switching from master to production. These are files that are ignored by git and are easily cleaned up by running
git clean -dxf