Created
June 19, 2012 01:34
-
-
Save jagbolanos/2951816 to your computer and use it in GitHub Desktop.
Parse ISO8601 Date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (NSDate*) parseISO8601DateString:(NSString*)dateString { | |
ISO8601DateFormatter *formatter = [[ISO8601DateFormatter alloc] init]; | |
formatter.parsesStrictly = YES; | |
NSDate *date = [formatter dateFromString:dateString]; | |
[formatter release]; | |
return [[date retain] autorelease]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment