NSDateFormatter *aDateFormatter = [[NSDateFormatter alloc] init];
[aDateFormatter setLocale:aLocale];
[aDateFormatter setDateStyle:NSDateFormatterFullStyle];
[aDateFormatter setDateFormat:@"EEE, MMM dd, yyyy"];
NSDate *aDateFromString = [aDateFormatter dateFromString:aKey];
这里, 的aKey =伦,2010年10月11日
aLocale = fr_CH表示NSDateFormatter返回nil的NSDate对象
我aDateFromString
即将为nil
。我的代码有什么问题?
使用按钮或缩进与4位代码。 – 2010-10-11 20:25:23
现在不可读吗? – Abhinav 2010-10-11 20:42:31