将NSDate转换为长格式字符串并返回?
答
喜欢的东西:
NSDate *date=//...;
;
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setTimeStyle:NSDateFormatterNoStyle];
[dateFormatter setDateStyle:NSDateFormatterLongStyle];
NSString *string=[dateFormatter stringFromDate:date];
//....
NSDate *newDate=[dateFormatter dateFromString:string];
还有更多的细节我不覆盖,如语言环境的问题和诸如此类的东西,但是这应该让你去