QQ是不是每天2小时算qq一天挂几个小时?

1373人阅读
- (void)viewDidLoad {
& & [super
viewDidLoad];
& & NSString *d =
@& 23:59:59&;
& & NSDateFormatter *format = [[NSDateFormatter
& & [format setDateFormat:@&yyyy:MM:dd HH:mm:ss&];
NSDate *date = [format
dateFromString:d];
NSLog(@&%i&, [ViewController
isCurrentDay:date]);
// 判断两个时间是否是同一天
+ (BOOL)isCurrentDay:(NSDate *)aDate
if (aDate==nil)
return NO;
& & NSCalendar *cal = [NSCalendar
currentCalendar];
& & NSDateComponents *components = [cal
components:(NSCalendarUnitEra|NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay)
fromDate:[NSDate
NSDate *today = [cal
dateFromComponents:components];
& & components = [cal components:(NSCalendarUnitEra|NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay)
fromDate:aDate];
NSDate *otherDate = [cal
dateFromComponents:components];
if([today isEqualToDate:otherDate])
return YES;
& & return
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:23184次
排名:千里之外
原创:59篇
转载:27篇
(1)(3)(1)(8)(7)(1)(5)(3)(1)(4)(4)(3)(3)(1)(3)(5)(2)(8)(6)(18)(1)QQ是什么时候开始按两小时算一天来计算的,哪一年?_百度知道QQ等级中 两个小时可以算一天 那是不是4个小时可以算两天?_百度知道

参考资料

 

随机推荐