YearlyRecurrenceRule
Represents a yearly recurrence rule.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class YearlyRecurrenceRule : MonthlyRecurrenceRule, INotifyPropertyChanged, ICloneable, IEquatable<RecurrenceRule>
Inheritance: objectRecurrenceRuleWeeklyRecurrenceRuleMonthlyRecurrenceRuleYearlyRecurrenceRule
Implements:
Inherited Members
Constructors
Initializes a new instance of the YearlyRecurrenceRule class.
public YearlyRecurrenceRule()
Initializes a new instance of the YearlyRecurrenceRule class.
Initializes a new instance of the YearlyRecurrenceRule class.
Initializes a new instance of the YearlyRecurrenceRule class.
public YearlyRecurrenceRule(DateTime start, int monthNumber, int weekNumber, WeekDays weekdays, int interval, int count)
The start of the recurrence rule.
monthNumberintThe month number.
weekNumberintThe week number.
weekdaysWeekDaysThe week days.
intervalintThe interval of the recurrence rule.
countintThe count.
Initializes a new instance of the YearlyRecurrenceRule class.
public YearlyRecurrenceRule(DateTime start, int monthNumber, int weekNumber, WeekDays weekdays, int interval)
The start of the recurrence rule.
monthNumberintThe month number.
weekNumberintThe week number.
weekdaysWeekDaysThe week days.
intervalintThe interval of the recurrence rule.
Initializes a new instance of the YearlyRecurrenceRule class.
Initializes a new instance of the YearlyRecurrenceRule class.
public YearlyRecurrenceRule(DateTime start, int monthNumber, WeekDays weekdays, int offset, int interval, int count)
The start of the recurrence rule.
monthNumberintThe month number.
weekdaysWeekDaysThe week days.
offsetintThe offset of the recurrence rule.
intervalintThe interval of the recurrence rule.
countintThe count.
Initializes a new instance of the YearlyRecurrenceRule class.
Initializes a new instance of the YearlyRecurrenceRule class.
Initializes a new instance of the YearlyRecurrenceRule class.
Initializes a new instance of the YearlyRecurrenceRule class.
Fields
The default month number; zero leaves month filtering unset.
public static readonly int DefaultMonthNumber
Properties
Gets the type of the recurrence rule.
public override RecurrenceType Frequency { get; }
The type of the recurrence rule.
Overrides:
Gets or sets the month number.
public int MonthNumber { get; set; }
The month number.
Methods
Copies the inherited recurrence settings and the month number to another yearly rule. FirstDayOfWeek is not copied by the inherited copy implementation. A nonzero inherited offset also does not initialize its matcher in the copied rule.
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 month number, then the inherited monthly, weekly, and shared recurrence settings. The inherited weekly comparison does not include FirstDayOfWeek.
public override bool Equals(RecurrenceRule other)
The rule to compare with this yearly rule.
Returns:true when the compared settings are equal; otherwise, false.
Overrides:
Gets the last day of the candidate's year for negative weekday-offset calculations.
protected override DateTime GetNegativeOffsetStart(DateTime date, DateTimeFormatInfo dateTimeFormat)
A date in the year to inspect.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used to find the year's end.
Returns:The last day of the year containing date.
Overrides:
Gets the occurrence start given a occurrence index.
public override DateTime GetOccurrenceStart(int index, DateTime startDate, DateTimeFormatInfo dateTimeFormat)
The index.
startDateDateTimeThe start of the recurring series.
dateTimeFormatDateTimeFormatInfoThe date time format.
Returns:Overrides:
Gets the first day of the candidate's year for positive weekday-offset calculations.
protected override DateTime GetPositiveOffsetStart(DateTime date, DateTimeFormatInfo dateTimeFormat)
A date in the year to inspect.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information.
Returns:The first day of the year containing date.
Overrides:
Checks the candidate against configured month, week, and day positions plus the weekday mask.
protected override bool IsOffsetMatch(DateTime date, DateTimeFormatInfo dateTimeFormat)
The candidate date to check.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used for period calculations.
Returns:true when the candidate matches all applicable constraints; otherwise, false.
Overrides:
Checks the year interval and any configured month, week, day, 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 yearly pattern; otherwise, false.
Overrides:
Matches a day position within the selected month when one is configured. Without a month, it derives a year-boundary-relative target but compares that value with the candidate's day of month.
protected bool MatchDayNumber(DateTime date, DateTimeFormatInfo dateTimeFormat)
The candidate date to check.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used to find period boundaries.
Returns:true when the candidate is at the configured day position; otherwise, false.
Matches the configured week position within the month when a month is selected, or within the year otherwise. Negative positions count back from the period's final week.
protected bool MatchWeekNumber(DateTime date, DateTimeFormatInfo dateTimeFormat)
The candidate date to check.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used to determine week numbers and week starts.
Returns:true when the candidate is in the configured week; otherwise, false.
After a match, suggests the first day of the same month next year when MonthNumber is unset or numerically less than the candidate's month.
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: