好的,直截了当,我要制作这样的日历格式
YYYY年MM月DD日
我已经这样设置我的代码
- (void)RecentStartDidSelect:(NSDate *)selectedDate element:(id)element {
self.selectedDate = selectedDate;
//////
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:[[NSLocale preferredLanguages] objectAtIndex:0]] autorelease]];
[dateFormat setDateFormat:@"YYYY(EEE)-MM(EEEm)-dd(EEE)"];
NSString *theDate = [dateFormat stringFromDate:self.selectedDate];
//may have originated from textField or barButtonItem, use an IBOutlet instead of element
Recent_start.text = theDate;
[Recent_start resignFirstResponder];
}
输出是
theDate-->2013(Wed)-02(Wed48)-06(Wed)
我现在迷路了,如何创建这样的日期格式? :((请帮助
最佳答案
[dateFormatter setDateFormat:@"yyyy年MM月dd日"];
那是中国人
关于ios - 日语日期格式ios,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/14723223/