I have two arbitrary dates, lets say April 1st 2012 and January 15th 2013. I want to calculate the number of Sundays, Mondays, Tuesdays, Wednesdays, Thursdays, Fridays, and Saturdays between those two dates.
Is there a surefire-quick way to do this without crippling the users CPU/browser?
Thanks
Update
The premise of this is, we have a defined average number of events for any given day of the week. We need to calculate the number of events to happen in a time period, even for partials (like 1/2 day of Sunday would be half the number of events added to total)