Reputation: 50826
Since initWithDateFormat:allowNaturalLanguage: is now deprecated,
NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] initWithDateFormat:@"%B %d, %Y" allowNaturalLanguage:NO] autorelease];
How does one currently format with the same formatting string using 2.2.1?
Upvotes: 0
Views: 245
Reputation: 17478
Pl. use the following steps:
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
Upvotes: 1
Reputation: 10722
Just manually assign to dateFormat and only use "init" instead of "initWithDateFormat:...".
The Natural Language stuff is what appears to be deprecated.
Upvotes: 0