My question is the REVERSE of the typical "How do I know if NSDate is between startDate and endDate?"
What I want to do is find ALL NSDATES (per day, not hour or minute) that happen BETWEEN startDate and endDate. The inclusion of these dates would be preferable, although this was not necessary.
Example: (I know that they do not represent NSDates, this is for illustration only)
INPUT: startDate = 6/23/10 20:11:30 endDate = 6/27/10 02:15:00
CONCLUSION: NSArray from: 6/23/10, 6/24/10, 6/25/10, 6/26/10, 6/27/10
I don't mind doing the job. Itβs just that I donβt know where to start from the point of view of creating efficient code, without the need to gradually change NSDates.
objective-c iphone nsdate
Daniel Amitay
source share