0
我試圖更改日期格式,我從我的web服務,以更友好的形式獲得,這是我做的:iOS的 - 改變的NSDate格式使得所有日期一月
NSDateFormatter *currentFormat = [[NSDateFormatter alloc] init];
currentFormat.dateFormat = @"yyyy-mm-dd HH:mm:ss";
NSDate *date = [currentFormat dateFromString:[voicenote valueForKeyPath:@"Voicenote.created"]];
NSLog(@"%@", [currentFormat stringFromDate:date]);
NSDateFormatter *friendlyFormat = [[NSDateFormatter alloc] init];
friendlyFormat.dateFormat = @"EE, d LLL yyyy HH:mm";
但是當我去打印它出來,最初的日期是好的,但當我改變它友好的格式,他們都是一月。