+ (NSData *)getTargetDate:(NSInteger) dis {
NSDate *currentDate = [NSDate date];
NSDate *targetDate;
NSTimeInterval oneDay =24*60*60;//1天的长度
if(dis!=0) {
//未来若干时间的天数+ , 过去若干时间的天数-
targetDate = [currentDate initWithTimeIntervalSinceNow:+oneDay*dis];
}
else {
targetDate = currentDate;
}
}
网友评论