tektipsismyfavorite
Technical User
I built a custom calendar and i've successfully been able to list out events on it based on the date (YYYY-MM-DD), however my next obstacle is allowing events to re-occur more than once. For instance, if something needs to happen the 3rd Friday of every month. Or repeating an event on the 15th of every month. Or every other day or every other week.
I was just curious if anyone has ever tackled this obstacle and wondered how is it accomplished. I store my events in a single table and the occurance of the event is stored as a DATETIME field (in MySQL).
My original idea was to use 0000 as the year for items that re-occured yearly. And 00 for month/day for events that occured every month on X day or every month on a certain day of a certain week. I'm not entirely sure how to implement that, but once I establish what system I'm going to use, the other issue is inserting that event into my array which already holds all the events for that particular month. and it would need to be inserted at the right spot (in order) so when it came time to output that day, it was in the right place.
Any ideas are helpful! Thanks.
I was just curious if anyone has ever tackled this obstacle and wondered how is it accomplished. I store my events in a single table and the occurance of the event is stored as a DATETIME field (in MySQL).
My original idea was to use 0000 as the year for items that re-occured yearly. And 00 for month/day for events that occured every month on X day or every month on a certain day of a certain week. I'm not entirely sure how to implement that, but once I establish what system I'm going to use, the other issue is inserting that event into my array which already holds all the events for that particular month. and it would need to be inserted at the right spot (in order) so when it came time to output that day, it was in the right place.
Any ideas are helpful! Thanks.