工作日EEE的NSDateFormatter问题 [英] NSDateFormatter problem with weekday EEE
本文介绍了工作日EEE的NSDateFormatter问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么会输出以下代码:Dday :(空)
Why does the following code output: Dday: (null)
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"EEE HH:mm:ss"];
NSDate *date = [dateFormatter dateFromString:@"Sun 15:00:00"];
DLog(@"Ddate: %@", date);
如果我使用格式HH:mm:ss和字符串15:00:00,则会得到一个有效的日期...
If I use the format HH:mm:ss and string 15:00:00 i get a valid date...
欢呼队友
推荐答案
它可能与您的系统/设备的语言环境有关,请查看以下来自Apple的内容
It may be related to the locale of your system/device, have a look at the following from apple
http://developer.apple.com/mac/library/qa/qa2010/qa1480.html
这篇关于工作日EEE的NSDateFormatter问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文