I am trying to do some basic operations with Dates on the iPhone. I want to take a string like "2010-02-19" and turn it into a string like "Friday, Feb 19." The strings I will be receiving will always be in 2010-02-19. Right now, I am running the following code that works, but it produces a warning that says "NSDate may not respond to +dateWithNaturalLanguageString:"
NSDate *date = [NSDate dateWithNaturalLanguageString:scheduled];
NSDateFormatter *df = [[[NSDateFormatter alloc] init] autorelease];
[df setDateFormat:@"EEEE, MMM dd"];
return [df stringFromDate:date];
The code works, but it produces that warning. Should I worry about it, or is this OK on the iPhone. Is there another NSDate initializer that I should be using?