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.