Yearly recurrences

I am having a braincramp day, I am trying to set a yearly recurrence as such:


rule.requency = Frequency.yearly
rule.Interval = 1
rule.ByMonth(4) ’ For April

Dim oint as integer = 2
Dim oday as System.DayOfWeek = System.DayOfWeek.Tuesday

Dim odays As Aspose.icalendar.ByDay = New Aspose.iCalendar.ByDay(oint, oday)rule.ByDay.Add(odays)
rule.count = 10

I basically want a yearly recurrence on the Second Tuesday of April for 10 ocuurences. When the generateoccurrences() method is processed I am only returning one date. What am I doing wrong here?

Rick

Here is the pattern you need:

DTSTART:20000101T000000 RRULE:FREQ=MONTHLY;COUNT=10;BYMONTH=4;BYDAY=2TU

Note it must be MONTHLY, not YEARLY.

The reason it does not work with YEARLY pattern is because BYDAY=2TU (2nd Tuesday) is considered 2nd Tuesday in a year, not in a month.

Roman,
Thanks! that did the trick ...Yes


Rick