Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
このような文字列に必要な NSFormat は何ですか?
2012 年 6 月 15 日 (金) 15:37:38 GMT
そこから NSDate オブジェクトを作成しようとしています。ありがとう
以下を使用します
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"EEE, dd MMM yyyy HH:mm:ss z"]; NSDate *date = [formatter dateFromString:@"Fri, 15 Jun 2012 15:37:38 GMT"]; NSLog([date description]); //2012-06-15 15:37:38 +0000