您的位置:首页 > 其它

转换日期格式 年/月/日 /星期

2016-01-04 12:13 369 查看
  NSDateFormatter *timeFormatter = [NSDateFormatter
new];
  [timeFormatter setDateStyle:NSDateFormatterFullStyle];
  NSLocale *locale = [[NSLocale
alloc] initWithLocaleIdentifier:@"zh"];
  [timeFormatter setLocale:locale];
  timeFormatter.dateFormat = @"yyyy/MM/dd EEE";
    NSString * str= [timeFormatter
stringFromDate: NSDate * date = [NSDate
date];
];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: