//yyyy-MM-dd HH:mm:ss
//xxxx年xx月xx天xx时xx分xx秒
- (NSString *)dateToTime:(NSInteger)integer
{
NSDate *confromTimesp = [NSDate dateWithTimeIntervalSince1970:integer];
NSDateFormatter *dateFormate = [[NSDateFormatter alloc] init];
[dateFormate setDateFormat:@"MM-dd HH:mm"];
NSString *timeStr = [dateFormate stringFromDate:confromTimesp];
return timeStr;
}
iOS:时间戳转日期
最新推荐文章于 2024-04-02 13:49:15 发布