Re: How can I stop NSNumberFormatter (via Pallet) from always rounding to two decimal places?
Re: How can I stop NSNumberFormatter (via Pallet) from always rounding to two decimal places?
- Subject: Re: How can I stop NSNumberFormatter (via Pallet) from always rounding to two decimal places?
- From: Justin Spahr-Summers <email@hidden>
- Date: Sun, 13 Mar 2005 14:04:34 -0600
NSNumberFormatter:
- (void)setRoundingBehavior:(NSDecimalNumberHandler *)newRoundingBehavior
Sets the rounding behavior used by the receiver to newRoundingBehavior.
And NSDecimalNumberHandler appears to allow you to initalize it with
how many digits after the decimal point you wish to have.
On Sun, 13 Mar 2005 10:53:09 -0800, Frederick C. Lee
<email@hidden> wrote:
> Greetings:
> The default NSNumberFormatter from the pallet always insists on having
> ONLY two-digit decimals.
>
> For Example:
>
> Input: 12345.6789
> Format Pattern: ###,###,###,###,##0.#####
> Output: 12,345.68
>
> Desired output: 12,345.6789
>
> That pattern doesn't seem to have much influence.
> How can I just put commas in, without ROUNDING?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden