Re: NSDateFormatter formats from NSLocale
Re: NSDateFormatter formats from NSLocale
- Subject: Re: NSDateFormatter formats from NSLocale
- From: Greg Guerin <email@hidden>
- Date: Tue, 11 Aug 2009 14:40:21 -0700
Houdah - ML Pierre Bernard wrote:
NSMutableString *dateFormat = [NSMutableString stringWithString:
[dateFormatter dateFormat]];
[dateFormat replaceOccurrencesOfString:@"d" withString:@"dd"
options: 0 range:NSMakeRange(0, [dateFormat length])];
Unrestricted replacement of meta-characters doesn't handle quoted
meta-characters in the formatting string. If you're going to do this
task using meta-character replacement, you'll have to parse the
entire format, correctly handling the quoted parts.
http://unicode.org/reports/tr35/tr35-6.html#Date_Format_Patterns
http://developer.apple.com/documentation/Cocoa/Conceptual/
DataFormatting/Articles/dfDateFormatting10_4.html#//apple_ref/doc/uid/
TP40002369
-- GG
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden