GitXplorerGitXplorer
m

MRCurrencyRound

public
14 stars
4 forks
2 issues

Commits

List of commits on branch master.
Unverified
823e4f65ca65270e287d0160801000edbd74a544

Set rounding increment

mmarkrickert committed 11 years ago
Unverified
a27bba227bc9c7f79b28abf363c25bec7747b715

Merge pull request #3 from brianantonelli/master

mmarkrickert committed 11 years ago
Unverified
1686716d5b74b5af2ef5f0541731d44f148a48fe

currencyString was missing from header

bbrianantonelli committed 11 years ago
Unverified
8562e026474ff5d5d00481b654418025872850fc

Publish podspec.

mmarkrickert committed 12 years ago
Unverified
2b3cb3e48b67069dc2bf8a64ee9533c988b5453b

Update readme. Add license file.

mmarkrickert committed 12 years ago
Unverified
f8b76bac68c768492bb3421522152d563aca036f

Added readme.

mmarkrickert committed 12 years ago

README

The README file for this repository.

MRCurrencyRound

A simple NSNumber class extension that provides better formatting for currency.

Use this to correctly round an NSNumber to the 2nd decimal point based on standard "round half-up" methodology in order to calculate tax and percentages of currency, etc.

How to install:

If you're not using CocoaPods, you should be. Simply add pod 'MRCurrencyRound' to your Podfile

How to use:

After you've got the pod installed into your project's workspace, you can use the methods NSNumber.currencyRound and NSNumber.currencyString to return properly formatted currency objects.

Example:

NSNumber *example = [NSNumber alloc] initWithFloat:43.652443f];
NSLog(@"Currency String: %@", example.currencyString);
// Currency String: $43.65
// Or whatever your local currency format is (€43.65 or 43.65DKK)