iCalendar Hourly

How would I define a iCalendar for the following:

Every hour from 9:00 AM to 5:00PM

and

Every weekday

?

i.e can you combine daily and hourly crietria in iCalendar?


This message was posted using Aspose.Live 2 Forum

Hi,

Please find the example below for generating dates for a month, every weekdays, every hour 9AM to 5PM.

RecurrencePattern pattern = new RecurrencePattern(
“DTSTART:20100301T090000\n” +
“RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;BYHOUR=9,10,11,12,13,14,15,16;UNTIL=20100331T170000\n”);

DateCollection dates = pattern.GenerateOccurrences();
foreach (DateTime date in dates)
{
Console.WriteLine(date.ToString());
}