I have an NSArray
of CFAbsoluteTime
s. They should be sorted from earliest to latest, but if not I can sort them.
What I need to do is find the min and max date (e.g. Jan 1 to Jan 5) and create a bucketization that shows the count for each day between, e.g.:
Jan 1 - 1
Jan 2 - 0
Jan 3 - 4
Jan 4 - 0
Jan 5 - 3
Something like that. What is the simplest way to turn the absolute times into a rounded NSDate
of some sort I can count? Intermediate forms don't really matter to me. I just need to write a function that returns a count when given a date.