时间戳问题

NSDate *currentDate = [NSDate date];

NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];

[dateFormatter setDateFormat:@"YYYY"];

NSString *dateString = [dateFormatter stringFromDate:currentDate];

你可能感兴趣的:(时间戳问题)