摘要: 方法一: 可以用nsdate 的 timeIntervalSince1970 方法把时间转换成时间戳进行比较,这里timeIntervalSince1970返回的是NSTimeInterval(double)类型,直接比较就可以了方法二:使用nsdate的compare方法实现- (BOOL)date:(NSDate*)date isBetweenDate:(NSDate*)beginDate andDate:(NSDate*)endDate{ if ([date compare:beginDate] == NSOrderedAscending) return NO; ... 阅读全文
posted @ 2013-06-24 17:38 cocoajin 阅读(657) 评论(0) 推荐(0) 编辑