标签:
NSCalendar *cal = [NSCalendar currentCalendar]; unsigned int unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit; NSDateComponents *d = [cal components:unitFlags fromDate:[NSDate date] toDate:newDate options:0];//newDate为未来的某一天 DLog(@"day = %d month = %d year = %d",[d day]+1,[d month],[d year]);
标签:
原文地址:http://www.cnblogs.com/yyzanll/p/4580325.html