Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master
README.textile

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.

License

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

Branch Structure

There are two branches to this repository. master and production

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.

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:

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

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

git clean -dxf 
Something went wrong with that request. Please try again.