NSDate - Natural language date parsing in early Leopard releases

Q: Did support in NSDate for natural language parsing cease in Leopard? Strings like "tomorrow" and "next month" don't seem to be recognized.

A: No, NSDate's parsing of natural language strings is still supported. However, this did regress briefly with the initial release of Leopard. The previous behavior has been restored as of 10.5.2.

In More Detail

If your application takes advantage of +dateWithNaturalLanguageString: or +dateWithNaturalLanguageString:locale: your users may see reduced functionality when they upgrade to Leopard. Strings like "tomorrow", "next Tuesday", or "last month" won't be recognized the way they were under Tiger. This is evident in the initial 10.5 release and update 10.5.1, but the functionality is restored in the 10.5.2 update.

What You Need To Do

No changes to your code are required. Upgrading to at least 10.5.2 will restore the behavior.

See Also

For more on the parsing and formatting of dates see the Cocoa Documentation for Dates and Times Programming Topics for Cocoa and more specifically, the class references for, NSDate, NSDateFormatter, and NSLocale.

Document Revision History

DateNotes
2008-02-27First Version

Posted: 2008-02-27


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.