Free Support Forum -

Recurrence Pattern Like Aspose.Recurrence.MonthlyWeekDay

I need to create two monthly recurrence patterns that match:

  1. the second weekday of every second month
  2. the last weekend day of every second month

I've managed to find some info from the old Aspose.Recurrence component that would seems to solve my problem:

How can this be accomplished using Aspose.iCalendar?

Thank you,

As usual I've figured it out myself shortly after my post.

Here's a sample of how to create a pattern that matches the last weekend day of every second month:

RecurrenceRule rrule = new RecurrenceRule();
rrule.Frequency = Frequency.Monthly;
rrule.BySetPos.Add(-1); // match the last occurrence
rrule.Interval = 2; // every second month