• 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
Parsing date strings with NSDate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parsing date strings with NSDate


  • Subject: Parsing date strings with NSDate
  • From: Mark Meyer <email@hidden>
  • Date: Mon, 13 Dec 2004 23:52:50 -0800

Hello,

I am trying to read date strings from various documents using NSDate. The dateWithNaturalLanguageString is very handy, but I can't seem to find anything in the API that handles ISO 8601 dates. The best I can get from this: 2004-12-13T09:54:32-05:00 is this: 2004-12-13 05:00:32 +0000 which is clearly wrong. It seems odd that I can easily parse dates like "last tuesday' but can't parse a date in an ISO format. So before I go off to subclass hell I thought I would check to make sure I am not missing anything obvious.

If I do need to do this myself, does anybody have advice on heuristics when confronted with lots of dates in lots of formats?

Thanks

_______________________________________________
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


  • Follow-Ups:
    • Re: Parsing date strings with NSDate
      • From: Malte Tancred <email@hidden>
    • Re: Parsing date strings with NSDate
      • From: Georg Tuparev <email@hidden>
    • Re: Parsing date strings with NSDate
      • From: Joakim Danielson <email@hidden>
  • Prev by Date: Re: ftp in cocoa apps
  • Next by Date: Re: How can I make Darwin see the most recent PHP from the shell prompt?
  • Previous by thread: Re: Desperate for bindings help! Can ya spare a few minutes?
  • Next by thread: Re: Parsing date strings with NSDate
  • Index(es):
    • Date
    • Thread