• 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: How to parse unpredictable date strings [WAS: Two digit dates with NSDateFormatter]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to parse unpredictable date strings [WAS: Two digit dates with NSDateFormatter]


  • Subject: Re: How to parse unpredictable date strings [WAS: Two digit dates with NSDateFormatter]
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 8 Oct 2009 10:30:07 -0600


On Oct 8, 2009, at 7:32 AM, Matthew Lindfield Seager wrote:

Which makes me now ask, how does everyone else parse unpredictable user
input? Do I just try one format after another until I get a non-null date
(and hope the interpreted date was what the user meant) or do I go back to
the "not recommended" natural language formatting?

Use a 10.0-style date formatter. They're much better at parsing user- generated date strings than the newer 10.4-style formatters in my experience.


Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to parse unpredictable date strings [WAS: Two digit dates with NSDateFormatter]
      • From: Matthew Lindfield Seager <email@hidden>
References: 
 >How to parse unpredictable date strings [WAS: Two digit dates with NSDateFormatter] (From: Matthew Lindfield Seager <email@hidden>)

  • Prev by Date: Re: app delegate +initialize
  • Next by Date: Animate a UIImageView's animatingImages?
  • Previous by thread: How to parse unpredictable date strings [WAS: Two digit dates with NSDateFormatter]
  • Next by thread: Re: How to parse unpredictable date strings [WAS: Two digit dates with NSDateFormatter]
  • Index(es):
    • Date
    • Thread