Recurring events on a calendar
Posted: Wed Aug 13, 2003 7:02 am
Hi,
Just found these forums, so i'd thought i'd ask a question that has been troubling me for a few weeks now.
I am currently developing an intranet for the company i work for, and all is going well.
There is a calendar/diary on there, which people can add events to, like "call client". All the info is stored in a MySQL database.
Some of these events occur on a monthly basis - this is where the problems start. It is easy enough, to get the event to show up every month, but if the following month is a saturday or sunday, i want the event to be shown on the monday.
Also, if i have a recurring event that first occured on the 31st of a month, this event will need to occur on the last working day of the next month.
Basically, on a monday, i need to check back 2 days to see if anything occurred over the weekend, but what if the monday is the 1st day of the month, and the previous month has 30 days, and i had an event sheduled that started on the 31st of a month??
Even typing this message is frying my brain. Is it actually this complicated, or am i missing something?
I dont want anyone to write the code for me, just want some ideas on the best way to acheive this.
Hope it all made sense.
Thanks in advance
Mark
Just found these forums, so i'd thought i'd ask a question that has been troubling me for a few weeks now.
I am currently developing an intranet for the company i work for, and all is going well.
There is a calendar/diary on there, which people can add events to, like "call client". All the info is stored in a MySQL database.
Some of these events occur on a monthly basis - this is where the problems start. It is easy enough, to get the event to show up every month, but if the following month is a saturday or sunday, i want the event to be shown on the monday.
Also, if i have a recurring event that first occured on the 31st of a month, this event will need to occur on the last working day of the next month.
Basically, on a monday, i need to check back 2 days to see if anything occurred over the weekend, but what if the monday is the 1st day of the month, and the previous month has 30 days, and i had an event sheduled that started on the 31st of a month??
Even typing this message is frying my brain. Is it actually this complicated, or am i missing something?
I dont want anyone to write the code for me, just want some ideas on the best way to acheive this.
Hope it all made sense.
Thanks in advance
Mark