|
Patience young Padawan, we have lives (work, family, school, etc) and do not spend every waking moment here awaiting your questions. Sometimes it can take a day or two before someone who can answer your question visits the forum.
Think of "NUM_DAYS" as a counter that is going to count backwards when you hit the start day of the event. As you are generating the calender and adding the events to each day, you will only need a simple If statement to determine if "NUM_DAYS" is greater than zero. If it is then put the event on that calendar day and deduct one from "NUM_DAYS".
You don't necessarily have to use "NUM_DAYS" from your structure, you could simply assign its value to another variable that will be the actual counter.
This way as your calendar is being generated forward the counter will be counting down from the start date and adding the event to the calendar.
Does that help?
|