Is it possible for you guys to write a ReverseRule method?
The way this would work would be for instance, suppose I want the occurence for every friday I would have :-
DTSTART:19960101T000000
RRULE:FREQ=WEEKLY;UNTIL=19961201T000000Z;BYDAY=FR
EXRULE:FREQ=WEEKLY;UNTIL=19961201T000000Z;BYDAY=MO,TU,WE,TH,SA,SU
The EXRULE is needed to ensure the start date is a friday but surely the EXRULE can be computed by you from the RRULE?
The ReverseRule method will simply take the rule and just generate the negative of the rule. so I can do something like :-
RecurrencePattern pattern = new RecurrencePattern();
pattern.StartDate = new DateTime(1996, 1, 1);
RecurrenceRule rule = pattern.RRules.Add();
rule.Frequency = Frequency.Weekly;
rule.Until = new DateTime(1996, 12, 1);
rule.ByDay.Add(new ByDay(DayOfWeek.Friday));
RecurrenceRule exRule = pattern.ExRules.Add(rule.ReverseRule());