The problem with using predicates is that if they use standard date comparisons, they will return dates that exactly match the date and time of that date. If you need today's dates, you will need to add the -isToday method somewhere (possibly as an extension for NSDate), for example:
-(BOOL)dateIsToday:(NSDate *)aDate { NSDate *now = [NSDate date]; NSCalendar *cal = [NSCalendar currentCalendar]; NSDateComponents *nowComponents = [cal components:NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit fromDate:now]; NSDateComponents *dateComponents = [cal components:NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit fromDate:aDate]; return (([nowComponents day] == [dateComponents day]) && ([nowComponents month] == [dateComponents month]) && ([nowComponents year] == [dateComponents year])); }
Once you have it, just find the ones you have today:
NSMutableArray *itemsDueToday = [NSMutableArray array]; for (MyItem *item in items) { if ([self dateIsToday:[item date]) { [itemsDueToday addObject:item]; } }
source share