Re: Parsing date strings with NSDate
Re: Parsing date strings with NSDate
- Subject: Re: Parsing date strings with NSDate
- From: Joakim Danielson <email@hidden>
- Date: Tue, 14 Dec 2004 12:27:46 +0100
Use NSCalendarDate instead, it is better suited for converting
different date formats.
Joakim
On 2004-12-14, at 08.52, Mark Meyer wrote:
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
_______________________________________________
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