Here is my code :
Here's the output :
2011-01-18 16:00:00 +0000
Wednesday, 19 January 2011
So the 2nd output line is as expected, while the 1st output line is totally strange.
How come it's like that ?
Code:
NSString *s = @"Wednesday, 19 January 2011";
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"EEEE, dd LLLL yyyy"];
NSDate *date = [df dateFromString:s];
NSLog(@"%@",date);
NSLog(@"%@",[df stringFromDate:date]);
Here's the output :
2011-01-18 16:00:00 +0000
Wednesday, 19 January 2011
So the 2nd output line is as expected, while the 1st output line is totally strange.
How come it's like that ?
Last edited: