I am creating specs for a PHP/mySQL Calendar application for a client. One of the problems that will have to be solved is recurring events whose incidence is set by rules like "yearly on the first weekend for which Sunday is in May". The client would like to be able to set rules like "occurs every third Thursday March - June" etc.
Client has asked that they have the ability to define these and not to pre-populate the event incidences table with them for the next X years.
Are there any existing calendar solutions that allow for this sort of pattern based recurrence?
Does any calendar system query based on rules like this rather than using the parameters to generate incidences of the recurring event in the events table at the time the recurring event is created or updated?
What I am reading on this so far:
a. http://martinfowler.com/apsupp/recurring.pdf
b. http://www.kanzaki.com/docs/ical/recur.html
c. https://www.rfc-editor.org/rfc/rfc5545#page-37
d. https://www.rfc-editor.org/rfc/rfc5545#section-3.8.5.3
e. iCalendar "Field" list (for database schema based on iCalendar standard)
f. What's the best way to model recurring events in a calendar application?
g. http://en.wikipedia.org/wiki/ICalendar#Technical%5Fspecifications
h. http://muddybranch.thejkgroup.com/2005/01/why-remove-icalendar-recurring-rules/
i. Should I store dates or recurrence rules in my database when building a calendar app?
Note: this one suggests storing recurrence rules and also storing hard instances based on these for x months ahead.
j. Data structure for storing recurring events?
k. Should I store dates or recurrence rules in my database when building a calendar app?
i. 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 for 2020).
l. Calendar Recurring/Repeating Events - Best Storage Method Unique answer w schema and SQL
m. https://github.com/tusharmath/sheql Language for recurring dates
n. https://github.com/tplaner/When This looks GREAT for generating dates based on rules – including RRULE’s