I have built a calendar application (monthly view) where users can input appointments and the like.
This part was quite easy, but now i need to add a feature so when someone adds an appointment, they can choose whether it reccurs weekly or monthly.
I haven't got a clue how to make the appointments appear for future dates.
I don't think i can use a cron job to update all the recurring appointments because a user is able to choose a month they want to view in the future and the appointment needs to be shown there too.
I can't imagine that for each day, i need to check back to see if there were any recurring events?
You could have the user choose a start_date and end_date along with the frequency.
You could also have the user choose every individual date from a twelve month calendar-- I prefer this method because of flexibility around holidays, plus it looks cooler.
sorry, yeah the frequency ie. ( daily, weekly, monthly, every Friday )of the recurring event. This method works well but you will have to output the dates based on the frequency - which can be tricky.