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: [http://www.aspose.com/Products/Aspose.Recurrence/Api/Aspose.Recurrence.MonthlyWeekDay.html ](http://www.aspose.com/Products/Aspose.Recurrence/Api/Aspose.Recurrence.MonthlyWeekDay.html)

How can this be accomplished using Aspose.iCalendar?

Thank you,
Scott

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.ByDay.Add(DayOfWeek.Saturday);
rrule.ByDay.Add(DayOfWeek.Sunday);
rrule.BySetPos.Add(-1); // match the last occurrence
rrule.Interval = 2; // every second month