Reputation: 4917
Recurrence Rule: This property is identified by the property name RRULE. This property defines a rule or repeating pattern for a recurring vCalendar entity, based on the Basic Recurrence Rule Grammar of XAPIA's CSA. The value for the property is a pattern specification for the recurrence. The following is an example of this property:
RRULE:W2 TU TH // Every other week, on Tuesday and Thursday
RRULE:D1 #10 // Daily for 10 occurrences
RRULE:YM1 6 7 #8 // Yearly in June and July for 8 occurrences
Support for this property is optional for implementations conforming to this specification.
so for this "Recurrence Rule" is their any algorithm so that it is easy to develop it.
Upvotes: 0
Views: 1959
Reputation: 10806
To me algorithm is what you have mentioned here .. i.e. "RRULE" .. you can "reverse-engineer" it to develop an application/module to output it back .. so its on to you (i.e. developer) to how to get output in this format.
I know that its not an easy job as I have played with around for a time before I came up with somewhat near solution. You can try some basic scheduler by creating a table, say events, with some of the fields like recurrence_type (daily, monthly, weekly, monthly_by_day, monthly_by_date), repeat_until, num_occurences etc.
To have all of the combinations of the RRULES it has to be very complex in order to output the desired format. I had tried it in PHP/MySQL.
Upvotes: 2