Skip to content

Instantly share code, notes, and snippets.

@myaaaaa-chan
Created April 30, 2013 02:40
Show Gist options
  • Select an option

  • Save myaaaaa-chan/5486304 to your computer and use it in GitHub Desktop.

Select an option

Save myaaaaa-chan/5486304 to your computer and use it in GitHub Desktop.
日付文字列をISO-8601形式のNSDate型に変換するコード ref: http://qiita.com/items/72a6f7e2ea62e2f0f163
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