MRCurrencyRound icon indicating copy to clipboard operation
MRCurrencyRound copied to clipboard

Why not use NSDecimalNumber and the NSRoundingBehavior classes?

Open MosheBerman opened this issue 11 years ago • 1 comments

Isn't this built in to the iOS SDK?

MosheBerman avatar Apr 29 '13 04:04 MosheBerman

Yeah, I bet i could simplify it a bit using the NSDecimalNumber instead of an NSNumber and an NSNumberFormatter, however, I'm no looking to turn 12.456 into 12,46, I'm looking to turn it into €12,46 (or something similar) so I need to use the NSLocale to get the currency symbol and append it wherever it needs to go on the number.

I'd love to see how you would improve this using NSDecimalNumber! Please send me a pull request!

markrickert avatar Apr 29 '13 12:04 markrickert