Reputation: 10968
I've read a many things about parsing date in obj-c, but I can't find anything dealing with dates like "Mon, 25 Apr 2011 11:53 am CDT"... I'd like to convert it to NSDate
in a smart way but I'm running out of ideas.
Thanks.
Upvotes: 1
Views: 189
Reputation: 24910
NSDateFormatter is a pretty complete class that covers all "human-friendly" date scenarios.
There's also several questions on stackoverflow that seem very similar to your question, so a quick search should help you out.
Upvotes: 0
Reputation: 243146
-[NSDateFormatter dateFromString:]
You'd probably use @"EEE, d MMM yyyy hh:mm a zzz"
as your date format string.
And by the way, googling "convert string to date objective-c" yields thousands of hits that have correct answers.
Upvotes: 4