Should I store dates or recurrence rules in my database when building a calendar app?

Separate your data into two parts: the “canonical” data (the recurrence rule) and “serving” (generated dates; read-only aside from regeneration). If the canonical data changes, regenerate the “serving” data at that point. For infinite recurrences, keep some number of instances and generate more if you run out (e.g. if the user looks at their calendar … Read more

What’s the best way to model recurring events in a calendar application? [closed]

I would use a ‘link’ concept for all future recurring events. They are dynamically displayed in the calendar and link back to a single reference object. When events have taken place the link is broken and the event becomes a standalone instance. If you attempt to edit a recurring event then prompt to change all … Read more