-5

我想将以下字符串解析为日期格式NSDateFormatter

2013 年 8 月 5 日星期一 00:00:00 +0000

我应该写什么日期格式?

我已经尝试过了,但它没有用。

NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"Day, dd Mon yyyy hh:mm:ss a"];
4

1 回答 1

2
[df setDateFormat:@"eee, dd MMM yyyy hh:mm:ss ZZZ"];

如果这不起作用,请将此作为参考:

http://www.unicode.org/reports/tr35/tr35-25.html#Date_Format_Patterns

于 2013-08-05T08:28:08.543 回答