how can I program a code, which counts every X-day. Like count every monday (or thursday, or whatever) from one NSDate to another (today).
I know, how to get the day of an NSDate by checking
$int weekday = [[NSCalendar currentCalendar]components:NSWeekdayCalendarUnit fromDate:myDate]weekday];
but this isn’t helping a bit…
(Of course, I could just calculate all days and / 7, but this isn’t working for my project I’m working on…)
Run a while loop starting at the first
NSDateand ending at the lastNSDate. Increment by one day each time and check whether the day is equal to the day you want.