• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDate dateWithNaturalLanguageString:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSDate dateWithNaturalLanguageString: (From: Jack <email@hidden>)

  • Prev by Date: Re: Command Line Arguments
  • Next by Date: Re: How do I convert NSNumber value to NSString?
  • Previous by thread: NSDate dateWithNaturalLanguageString:
  • Next by thread: NSFileManager fileManager:willProcessPath:
  • Index(es):
    • Date
    • Thread