Re: NSDate dateWithNaturalLanguageString:
Re: NSDate dateWithNaturalLanguageString:
- Subject: Re: NSDate dateWithNaturalLanguageString:
- From: "Sean McBride" <email@hidden>
- Date: Mon, 11 Apr 2005 10:34:35 -0400
- Organization: Rogue Research
On 2005-04-08 20:16, Jack said:
>Why does NSDate's class method dateWithNaturalLanguageString: when given a
>string of type: "20050406". Return an invalid date of
>"-3468036-03-03T04:00:00Z"? Given a string it doesn't understand it should
>return nil, like it does for "NotADate".
I guess it thinks it does understand it.
>The worst part is it will write it
>out to a property list but then it won't understand it when trying to read
>it back, it quits reading the whole property list altogether. Is this
>something that should be a bug report
I'd say so.
>or just a matter of unorthodox users
>who refuse to use a decent readable date format?
Your example (20050406) is fairly readable to a human, but I can see it
confusing a computer. Don't blame the user that the computer is not
smart enough. The computer is giving the user the impression that it can
read like a human, but it is far from doing so, and so you get lots of
'user error'. Personally, I've found the 'date from natural string'
stuff fairly useless, so much so that I never use it. Here's another fun
example: "sep 3 2004" works, but "sept 3 2004" does not.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden