Every now and then I face some feature that would be better if I put some recurring hability in it.
To make it clear let me use a known example. In Google Calendar, when I set an event as recurring let´s say every monday, it will show it every Monday. I can keep rolling the weeks forward and it will show the event.
I don´t really believe that they create the event in the database for every monday until the eternity :-), nor they create it until some far far away year.
I´d like to know if there´s some well known pattern for doing such a thing or any guide with best practices.
Thank You.
Daily appointments recur every day, every set number of days, or every weekday. Weekly appointments recur on the same day of the week every week, or every certain number of weeks. Monthly appointments recur on the same day of the month (the 10th), or on the same day of a certain week of the month (the third Monday).
Click Task, click the bottom part of the Task button and then click Recurring Task. In the Task Name box, type the recurring task's name. In the Duration box, add the duration of each occurrence of the task. In the Recurrence pattern section, click Daily, Weekly, Monthly, or Yearly.
cycle, oscillation. a single complete execution of a periodically repeated phenomenon. repeat, repetition. an event that repeats.
As far as I'm concerned, Martin Fowler has the definitive word on how to describe recurrences from a data modelling point of view. Once you've captured recurrences, you just need to provide code to retrieve events for a given date(time).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With