NSDateFormatter strangeness
NSDateFormatter strangeness
- Subject: NSDateFormatter strangeness
- From: Greg Hoover <email@hidden>
- Date: Mon, 17 Nov 2008 13:06:07 -0800
I've worked with formatters for a while now, but this morning
something odd happened. The following code translates the date string
"17 Nov 2008" to "2007-12-23 00:00:00 -0800".
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat: @"dd MMM YYYY"];
NSString *dateString = @"17 Nov 2008";
NSLog(@"%@ -> %@", dateString, [dateFormatter dateFromString:
dateString]);
[dateFormatter release];
I'm at a loss for what's happening. When I run stringFromDate on with
[NSDate date] I get "17 Nov 2008".
Thanks,
Greg
_______________________________________________
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