NSDateFormatter 怎样本土化


我怎么样才可以让

NSDateFormatter* formatter = [[NSDateFormatter alloc]init];
[formatter setDateFormat:@"EEE"];

打出 "周一,周二", 而不是 "Mon, Tue, Wed" 呢

ios localization nsdateformatter iphone

800℃008 11 years, 5 months ago
[dateFormat setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"]];

P.S. 如果没开ARC别忘了autorelease

Laggan answered 11 years, 5 months ago

Your Answer