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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to