Original start date is given, say 2010-09-22 (a Wednesday).
Also, the class goes for 4 weeks and is on Mondays and Wednesdays.
How would i calculate the dates based off this info?
Id like to build an array that stores an entry for each date this class happens. So end the end I need to have an array with the following:
2010-09-22
2010-09-27
2010-09-29
2010-10-04
2010-10-06
2010-10-11
2010-10-13
2010-10-18
I've tried looping through a for loop with the counter set to the number of weeks which is 4 but Im not sure exactly what to do. I'm assuming Ill use mktime to add the appropriate number of days to the original starting day but Im not sure how to calculate that.
So my logic goes something like this
Start Date -> Find what day of the week this is -> Find next recurring day and how many days from the last and add that to mktime