Created
April 30, 2013 02:40
-
-
Save myaaaaa-chan/5486304 to your computer and use it in GitHub Desktop.
日付文字列をISO-8601形式のNSDate型に変換するコード ref: http://qiita.com/items/72a6f7e2ea62e2f0f163
This file contains hidden or 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
| NSString *dateString = [dic objectForKey:@"2013-04-30T11:30:00+09:00"]; | |
| NSDateFormatter* formatter = [[NSDateFormatter alloc] init]; | |
| [formatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ssZZZZ"]; | |
| NSDate* date = [formatter dateFromString:dateString]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment