// #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)
imagemagic add text to image
rem different types of text annotations on existing images rem cyan yellow orange gold rem -gravity SouthWest rem draw text and anno...
-
Error:The element 'Schedule' has invalid child element 'RecurrenceRule'. List of possible elements expected: 'Occurring&...
-
Perfect blog post must include following elements (from 1 to 13): 1.Big catchy header in 30px font size 2.First copy of social links and com...
-
SetKeyDelay , 75 , 75 ;Exits AutoHotKey application. $^CapsLock:: ExitApp return ;Pauses AutoHotKey Script. F6:: Pause , Toggle, 1 $x:: ...
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