// #1: Monthly meetings that occur on the last Wednesday from 6pm - 7pm
// Create an iCalendar
iCalendar iCal = new iCalendar();
// Create the event
Event evt = iCal.Create<Event>();
evt.Summary = "Test Event";
evt.Start = new iCalDateTime(2008, 1, 1, 18, 0, 0); // Starts January 1, 2008 @ 6:00 P.M.
evt.Duration = TimeSpan.FromHours(1);
// Add a recurrence pattern to the event
RecurrencePattern rp = new RecurrencePattern();
rp.Frequency = FrequencyType.Monthly;
rp.ByDay.Add(new DaySpecifier(DayOfWeek.Wednesday, FrequencyOccurrence.Last));
evt.AddRecurrencePattern(rp);
// #2: Yearly events like holidays that occur on the same day each year.
// The same as #1, except:
RecurrencePattern rp = new RecurrencePattern();
rp.Frequency = FrequencyType.Yearly;
evt.AddRecurrencePattern(rp);
// #3: Yearly events like holidays that occur on a specific day like the first monday.
// The same as #1, except:
RecurrencePattern rp = new RecurrencePattern();
rp.Frequency = FrequencyType.Yearly;
rp.ByMonth.Add(3);
rp.ByDay.Add(new DaySpecifier(DayOfWeek.Monday, FrequencyOccurrence.First));
evt.AddRecurrencePattern(rp);
/*
Note that all events occur on their start time, no matter their
recurrence pattern. So, for example, you could occur on the first Monday
of every month, but if your event is scheduled for a Friday (i.e.
evt.Start = new iCalDateTime(2008, 3, 7, 18, 0, 0)), then it will first
occur on that Friday, and then the first Monday of every month after
that.
*/
Tuesday
dday ical example
Subscribe to:
Post Comments (Atom)
test smtp server with powershell
Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...
-
Here is instruction how to make blinking text in rainmeter: 1.right click and select " Edit skin " 2.add following code to temp...
-
Error:The element 'Schedule' has invalid child element 'RecurrenceRule'. List of possible elements expected: 'Occurring&...
-
If you use Visual Studio to open a Web project that was developed for the .NET Framework 2.0, the .NET Framework 3.0, or the .NET Framework...
1 comment:
HI,
I want to import & export events from yahoo calendar using DDay.ICal.
Do you have any example of it ?
Post a Comment