Having a tough time wrapping my head around this one. I am trying to make a study schedule for the user based on the days of the week they would select as the days they would plan to study. For example, if the user chooses to study only on Mondays, Wednesdays, and Thursdays, I would like to get the dates as such:
Monday: session 1
Wednesday: session 2
Thursday: session 3
next Monday: session 4
and so on…
I was thinking of using a DateInterval, and still think this is the way to go, but the date interval would be different for each of these days. M to W is DI 2. W to Th is DI 1. Th to M is DI 4
Without needing to have an enormous if…then for all possible scenarios, is there an easier way to accomplish this, considering also that of course, M W Th will not always be the selected study days?