NSDate 时间戳转字符串 ,字符串转NSDate,NSDat

2018-04-03  本文已影响49人  姀影

时间戳转成字符串

}

当前时间前几天数组

比较两个NSDate的大小

// NSLog(@"fromdate=%@",startDate);
//
// NSLog(@"enddate=%@",endDate);

if (result == NSOrderedDescending) {
    //NSLog(@"startDate  is in the future");
    return 1;
}
else if (result == NSOrderedAscending){
    //NSLog(@"startDate is in the past");
    return 0;
}
//NSLog(@"Both dates are the same");
return 0;

}

上一篇下一篇

猜你喜欢

热点阅读