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

Re: Parsing date strings with NSDate


  • Subject: Re: Parsing date strings with NSDate
  • From: Malte Tancred <email@hidden>
  • Date: Tue, 14 Dec 2004 14:43:02 +0100

On Dec 14, 2004, at 8.52, Mark Meyer wrote:
...but I can't seem to find anything in the API that handles ISO 8601 dates.

Oh, but correct ISO 8610 date formats can look so different. There are a plethora of valid variants.


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.

Nope, it's not. Depends on who you're talking to. The standard (apparently) makes quite clear that, for example, using the letter 'T' to separate date and time information is optional, depending on mutual agreement between the parts exchanging date strings.


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

Considering the diversity of date formats (ISO 8610, W3C's ISO 8610 profile, rfc822, et-cetera) you'll have to take care of this yourself.


But what's wrong with the date formatting strings? Why can't you use them? I had the impression you could create whatever format string you like.

/malte

--
Malte Tancred
Computer Programmer
Oops AB, http://oops.se/

_______________________________________________
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: 
 >Parsing date strings with NSDate (From: Mark Meyer <email@hidden>)

  • Prev by Date: Re: Cocoa-dev Digest, Vol 1, Issue 409
  • Next by Date: Re: Parsing date strings with NSDate
  • Previous by thread: Re: Parsing date strings with NSDate
  • Next by thread: Re: Handling right click only
  • Index(es):
    • Date
    • Thread