12
今天,昨天,本周,上周,本月,上个月获取NSDate ...变量
我想做的就是获取NSDate,今天,昨天,本周,上周,本月,上月准备好比较变量,以便在UITableView的titleForHeaderInSection中添加标头 我想要的是在以下代码中手动完成的,日期为2009-12-11 NSDate *today = [NSDate dateWithString:@"2009-12-11 00:00:00 +0000"]; NSDate *yesterday = [NSDate dateWithString:@"2009-12-10 00:00:00 +0000"]; NSDate *thisWeek = [NSDate dateWithString:@"2009-12-06 00:00:00 +0000"]; NSDate *lastWeek = [NSDate dateWithString:@"2009-11-30 00:00:00 +0000"]; NSDate *thisMonth = [NSDate dateWithString:@"2009-12-01 00:00:00 +0000"]; NSDate *lastMonth = [NSDate dateWithString:@"2009-11-01 00:00:00 +0000"];