Skip to content
A subclass of Cocoa's NSNumberFormatter that adds ordinals to numbers.
Objective-C
Find file
Latest commit 14553b6 Jul 29, 2011 @Abizern Modernise project to Xcode 4.1 and create a shared Development scheme
Leave the Deployment target to 10.6 for the project.
Failed to load latest commit information.
ADNOrdinalNumberFormatter.xcodeproj Modernise project to Xcode 4.1 and create a shared Development scheme Jul 29, 2011
English.lproj
.gitignore Add a .gitignore file Nov 12, 2010
ADNOrdinalNumberFormatter.h Create a workable Ordinal number formatter. Nov 12, 2010
ADNOrdinalNumberFormatter.m Improves the output for numbers such as 111 that should be written wi… Nov 12, 2010
ApplicationDelegate.h Add the ordinal number formatter to the inputField cell. Nov 12, 2010
ApplicationDelegate.m Add the ordinal number formatter to the inputField cell. Nov 12, 2010
Info.plist Initial commit Nov 12, 2010
LICENCE.txt Add a Simplified BSD Licence. Nov 12, 2010
Prefix.pch
README.textile Correct typo in README Jul 29, 2011
main.m Initial commit Nov 12, 2010

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.