- (NSMutableArray*)GetTomorrowDay:(int)day
{
NSDate*date = [NSDatedate];
NSMutableArray*arr = [NSMutableArrayarray];
NSCalendar*gregorian = [[NSCalendaralloc]initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
NSDateComponents*components = [gregoriancomponents:NSCalendarUnitWeekday|NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDayfromDate:date];
NSDateFormatter*formater = [[NSDateFormatteralloc]init];
[formatersetDateFormat:@"MM-dd"];
NSString*curTime = [formaterstringFromDate:date];
[arraddObject:curTime];
for(inti =1; i
{
[componentssetDay:([componentsday]+1)];
NSDate*beginningOfWeek = [gregoriandateFromComponents:components];
NSDateFormatter*dateday = [[NSDateFormatteralloc]init];
[datedaysetDateFormat:@"MM-dd"];
[arraddObject:[datedaystringFromDate:beginningOfWeek]];
}
returnarr;
}
输入数值 ,返回当天到数值的日期