views:

318

answers:

1

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.

+1  A: 

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.

Wbdvlpr
can you give me the link for your code sample .....so i can go through it...
Abhimanyu
sorry mate .. it was part of an application and code is not public .. you can try looking at some open source calendar applications to go through.
Wbdvlpr
dude i dont need your code i need the algorithm(way to read the rrule).
Abhimanyu