NSNumber Format weirdness
NSNumber Format weirdness
- Subject: NSNumber Format weirdness
- From: Joseph Jones <email@hidden>
- Date: Thu, 27 Jan 2005 21:08:29 -0800
Hi all,
I am trying to set a custom number format in a number formatter. The
format looks like this:
$#.##0,00;0,00;-$#.##0,00
Note that thousands are separated by a period and decimal is separated
by a comma. Pretty standard for European based currencies. I am
physically setting the thousands separator and decimal separator,
setting localizes to NO and setting the format as above. However the
formatter comes back with the following format:
$#,###.##000;0,00;-$#,###.##000
Here is the code I am using:
NSNumberFormatter* nsf = (NSNumberFormatter*)[projectCost
formatter];
[nsf setLocalizesFormat:NO];
[nsf setDecimalSeparator:dec];
[nsf setThousandSeparator:thou];
[nsf setFormat:[NSString
stringWithFormat:@"%@#%@##0%@00;0%@00;-%@#%@##0%@00",
curr, thou, dec,
dec,
curr, thou, dec]];
Anyone know what might be going on here? This is really weird and I
can't see why the format I am setting is not sticking.
TIA,
joe
_______________________________________________
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