Represents a monthly recurrence rule.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class MonthlyRecurrenceRule : WeeklyRecurrenceRule, INotifyPropertyChanged, ICloneable, IEquatable<RecurrenceRule>
Inheritance: objectRecurrenceRuleWeeklyRecurrenceRuleMonthlyRecurrenceRule
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the MonthlyRecurrenceRule class.
public MonthlyRecurrenceRule()
Initializes a new instance of the MonthlyRecurrenceRule class.
Initializes a new instance of the MonthlyRecurrenceRule class.
Initializes a new instance of the MonthlyRecurrenceRule class.
public MonthlyRecurrenceRule(DateTime start, DateTime end, int weekNumber, WeekDays weekdays, int interval, int count)
The start of the recurrence rule.
endDateTimeThe end of the recurrence rule.
weekNumberintThe week number.
weekdaysWeekDaysThe week days.
intervalintThe interval of the recurrence rule.
countintThe count.
Initializes a new instance of the MonthlyRecurrenceRule class.
public MonthlyRecurrenceRule(DateTime start, DateTime end, int weekNumber, WeekDays weekdays, int interval)
The start of the recurrence rule.
endDateTimeThe end of the recurrence rule.
weekNumberintThe week number.
weekdaysWeekDaysThe week days.
intervalintThe interval of the recurrence rule.
Initializes a new instance of the MonthlyRecurrenceRule class.
public MonthlyRecurrenceRule(DateTime start, DateTime end, WeekDays weekdays, int offset, int interval, int count)
The start of the recurrence rule.
endDateTimeThe end of the recurrence rule.
weekdaysWeekDaysThe week days.
offsetintThe offset.
intervalintThe interval of the recurrence rule.
countintThe count.
Initializes a new instance of the MonthlyRecurrenceRule class.
public MonthlyRecurrenceRule(DateTime start, DateTime end, WeekDays weekdays, int offset, int interval)
The start of the recurrence rule.
endDateTimeThe end of the recurrence rule.
weekdaysWeekDaysThe week days.
offsetintThe offset.
intervalintThe interval of the recurrence rule.
Initializes a new instance of the MonthlyRecurrenceRule class.
Initializes a new instance of the MonthlyRecurrenceRule class.
Initializes a new instance of the MonthlyRecurrenceRule class.
Initializes a new instance of the MonthlyRecurrenceRule class.
Initializes a new instance of the MonthlyRecurrenceRule class.
Initializes a new instance of the MonthlyRecurrenceRule class.
Fields
The default day position; zero leaves day-of-month filtering unset.
public static readonly int DefaultDayNumber
The default week position; zero leaves week-of-month filtering unset.
public static readonly int DefaultWeekNumber
Properties
Gets or sets the day number.
public int DayNumber { get; set; }
The day number.
Gets the type of the recurrence rule.
public override RecurrenceType Frequency { get; }
The type of the recurrence rule.
Overrides:
Gets or sets the week number.
public int WeekNumber { get; set; }
The week number.
Methods
Copies the base and weekly settings, plus the day-of-month and week-of-month positions. FirstDayOfWeek is not copied, and a nonzero inherited offset does not initialize its matcher.
protected override void CopyProperties(RecurrenceRule other)
The rule that receives the copied properties.
Overrides:
Creates a new instance of the concrete rule type for use by Clone().
protected override RecurrenceRule CreateInstance()
A new instance of the concrete recurrence-rule type.
Overrides:
Compares the day and week positions, then the inherited weekly and shared recurrence settings. The inherited comparison does not include FirstDayOfWeek.
public override bool Equals(RecurrenceRule other)
The rule to compare with this monthly rule.
Returns:true when the compared settings are equal; otherwise, false.
Overrides:
Gets the last day of the candidate's month for negative weekday-offset calculations.
protected override DateTime GetNegativeOffsetStart(DateTime date, DateTimeFormatInfo dateTimeFormat)
A date in the month to inspect.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used to find the month's end.
Returns:The last day of the month containing date.
Overrides:
Gets the occurrence start given an occurrence index.
public override DateTime GetOccurrenceStart(int index, DateTime startDate, DateTimeFormatInfo dateTimeFormat)
The index.
startDateDateTimeThe start date of the series.
dateTimeFormatDateTimeFormatInfoThe date time format.
Returns:Overrides:
Gets the first day of the candidate's month for positive weekday-offset calculations.
protected override DateTime GetPositiveOffsetStart(DateTime date, DateTimeFormatInfo dateTimeFormat)
A date in the month to inspect.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information.
Returns:The first day of the month containing date.
Overrides:
Checks the candidate against any configured week-of-month constraint and the weekday mask.
protected override bool IsOffsetMatch(DateTime date, DateTimeFormatInfo dateTimeFormat)
The candidate date to check.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used for week calculations.
Returns:true when the candidate matches both applicable constraints; otherwise, false.
Overrides:
Checks the month interval and any configured day-of-month, week-of-month, weekday-mask, and offset constraints.
public override bool MatchAdvancedPattern(DateTime date, DateTimeFormatInfo dateTimeFormat)
The candidate occurrence date.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used for week calculations.
Returns:true when the candidate matches the monthly pattern; otherwise, false.
Overrides:
Matches DayNumber from the beginning of the month when positive or from its end when negative.
protected bool MatchDayOfMonth(DateTime date, DateTimeFormatInfo dateTimeFormat)
The candidate date to check.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used to find the month's end.
Returns:true when the candidate is at the configured day position; otherwise, false.
Compares the candidate's calendar week number with the configured position relative to startDate.
protected bool MatchWeekOfMonth(DateTime date, DateTime startDate, DateTimeFormatInfo dateTimeFormat)
The candidate date to check.
startDateDateTimeA date in the first or last week used as the position's reference.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used to determine week numbers and week starts.
Returns:true when the candidate week matches the configured position; otherwise, false.
Matches WeekNumber relative to the first or last week of the candidate's month.
protected bool MatchWeekOfMonth(DateTime date, DateTimeFormatInfo dateTimeFormat)
The candidate date to check.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used to determine week numbers.
Returns:true when the candidate is in the configured week; otherwise, false.
Skips to the first day of the next interval month after a match when no weekday mask is configured.
public override bool TryGetCloseToNextOccurrenceDate(DateTime currentDate, bool hasOccurrenceOnCurrentDate, out DateTime closeToNextDate)
The candidate date currently being evaluated.
hasOccurrenceOnCurrentDatebooltrue when the candidate matches the rule.
closeToNextDateDateTimeWhen returning true, receives the next candidate date with the same time of day.
Returns:Overrides: