I have a calendar application that stores a date by breaking the 3 pieces (year, month, day) into 3 pieces and stores them seperately in their own fields. (Not my design, and it works awesomely, so changing is not an option)
I am now trying to modify it so I can add recurring items to the calendar (Staff meeting every wednesday, or conference for the next 5 days, that sort of thing) but I am unsure how to handle the rollover of a month and then a year.
For example, if I want something to repeat for 5 days and it starts 8/30, it should go 8/30 - 9/3. I don't know how to advance my 3-part dates to recognize the change in month and day so I don't end up with 8/34. Make sense?
Same thing with the end of the year...
How would I combine the 3 parts to a real date, advance the date by 1 for each day of the event and then split the date back to the 3 parts?
Any ideas?
Thanks!