RecurrenceRecurMonthly(DayOccurrence, DaysOfWeek, Int32) Method
Initialize a monthly recurrence pattern that occurs on a specific occurrence of a day of the week at
the specified monthly interval (i.e. the 4th Tuesday every two months).
Namespace: EWSoftware.PDIAssembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2023.1.2.0
public void RecurMonthly(
DayOccurrence occur,
DaysOfWeek daysOfWeek,
int recurInterval
)
Public Sub RecurMonthly (
occur As DayOccurrence,
daysOfWeek As DaysOfWeek,
recurInterval As Integer
)
public:
void RecurMonthly(
DayOccurrence occur,
DaysOfWeek daysOfWeek,
int recurInterval
)
member RecurMonthly :
occur : DayOccurrence *
daysOfWeek : DaysOfWeek *
recurInterval : int -> unit
Parameters
- occur DayOccurrence
- The occurrence of the day of the week on which to occur.
- daysOfWeek DaysOfWeek
- The days of the week on which to occur. This may be an individual week day
or any combination of week days.
- recurInterval Int32
- The interval between occurrences in months.
This is a convenience method that mimics the monthly recurrence pattern in Microsoft
Outlook. When called, it sets up the recurrence for a monthly pattern that recurs at the specified
interval on the specified occurrence of the days of the week. All rule parts are cleared prior to
setting the monthly options but other parameters such as the start date are left alone.
// Test monthly recurrence
rRecur.RecurMonthly(15, 2);
rRecur.StartDateTime = DateTime.Today;
rRecur.RecurUntil = DateTime.Today.AddMonths(12);
// With a collection
DateTimeCollection recurDates = rRecur.InstancesBetween(DateTime.Today,
DateTime.Today.AddMonths(12));
foreach(DateTime dt in recurDates)
Console.WriteLine("Monthly recurrence on: {0:d}", dt);
// Using the enumerator
foreach(DateTime dt in rRecur)
Console.WriteLine("Monthly recurrence on: {0:d}", dt);
// Test monthly recurrence
rRecur.RecurMonthly(DayOccurrence.Third, DaysOfWeek.Thursday, 3);
rRecur.StartDateTime = DateTime.Today;
// With a collection
Dim recurDates As DateTimeCollection = rRecur.InstancesBetween(DateTime.Today,
DateTime.Today.AddMonths(12));
foreach(DateTime dt in recurDates)
Console.WriteLine("Monthly recurrence on: {0:d}", dt);
// Using the enumerator
foreach(DateTime dt in rRecur)
Console.WriteLine("Monthly recurrence on: {0:d}", dt);
' Test monthly recurrence
rRecur.RecurMonthly(15, 2)
rRecur.StartDateTime = DateTime.Today
rRecur.RecurUntil = DateTime.Today.AddMonths(12);
' With a collection
DateTimeCollection recurDates = rRecur.InstancesBetween(DateTime.Today,
DateTime.Today.AddMonths(12))
For Each dt In recurDates
Console.WriteLine("Monthly recurrence on: {0:d}", dt)
Next
' Using the enumerator
For Each dt In rRecur
Console.WriteLine("Monthly recurrence on: {0:d}", dt)
Next
' Test monthly recurrence
rRecur.RecurMonthly(DayOccurrence.Third, DaysOfWeek.Thursday, 3)
rRecur.StartDateTime = DateTime.Today
' With a collection
Dim recurDates As DateTimeCollection = rRecur.InstancesBetween(DateTime.Today,
DateTime.Today.AddMonths(12))
For Each dt In recurDates
Console.WriteLine("Monthly recurrence on: {0:d}", dt)
Next
' Using the enumerator
For Each dt In rRecur
Console.WriteLine("Monthly recurrence on: {0:d}", dt)
Next
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.