NSDateFormatter *inputFormatter = [[NSDateFormatter alloc] init];
[inputFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss"];
NSDate *formatterDate = [inputFormatter dateFromString:@"2009-11-03T21:02:34-08:00"];
[inputFormatter release];
NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init];
[outputFormatter setDateFormat:@"HH:mm 'on' yyyy/MM/dd"];
[outputFormatter setTimeStyle:NSDateFormatterShortStyle];
[outputFormatter setDateStyle:NSDateFormatterShortStyle];
NSString *newDateString = [outputFormatter stringFromDate:formatterDate];
NSLog(@"newDateString %@", newDateString);
輸出日期的第一個和之後的時間如何解決這個問題?在短文體中解析時間和日期時NSDateFormatter中的錯誤
我想在很短的風格,比日