Home > ADNOrdinalNumberFormatter

ADNOrdinalNumberFormatter

ADNOrdinalNumberFormatter is a project mainly written in Objective-C, based on the View license.

A subclass of Cocoa's NSNumberFormatter that adds ordinals to numbers.

h2. ADNOrdinalNumberFormatter

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.

h2. License

Released under the Simplified BSD Licence. See the included LICENCE.txt file for the actual license.

h2. Branch Structure

There are two branches to this repository. master and production

h3. master branch

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.

h3. production branch

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:

bc. 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

bc. git pull origin

h3. Artefacts

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

bc. git clean -dxf

Previous:Codebot