New to Telerik UI for WinForms? Start a free 30-day trial

Represents a yearly recurrence rule.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

C#
public class YearlyRecurrenceRule : MonthlyRecurrenceRule, INotifyPropertyChanged, ICloneable, IEquatable<RecurrenceRule>

Inheritance: objectRecurrenceRuleWeeklyRecurrenceRuleMonthlyRecurrenceRuleYearlyRecurrenceRule

Implements: ICloneableIEquatable<RecurrenceRule>INotifyPropertyChanged

Inherited Members MonthlyRecurrenceRule.DefaultDayNumberMonthlyRecurrenceRule.DefaultWeekNumberMonthlyRecurrenceRule.MatchDayOfMonth(DateTime, DateTimeFormatInfo)MonthlyRecurrenceRule.MatchWeekOfMonth(DateTime, DateTimeFormatInfo)MonthlyRecurrenceRule.MatchWeekOfMonth(DateTime, DateTime, DateTimeFormatInfo)MonthlyRecurrenceRule.DayNumberMonthlyRecurrenceRule.WeekNumberWeeklyRecurrenceRule.DefaultOffsetWeeklyRecurrenceRule.MatchOffsetWeeklyRecurrenceRule.GetFirstDayOfWeek(DateTimeFormatInfo)WeeklyRecurrenceRule.MatchOffsetPositive(DateTime, DateTimeFormatInfo)WeeklyRecurrenceRule.MatchOffsetNegative(DateTime, DateTimeFormatInfo)WeeklyRecurrenceRule.MatchDayOfWeekMask(DateTime, Calendar)WeeklyRecurrenceRule.IncludeWeekDays(WeekDays)WeeklyRecurrenceRule.ExcludeWeekDays(WeekDays)WeeklyRecurrenceRule.AreWeekDaysIncluded(WeekDays)WeeklyRecurrenceRule.IntersectsWithException(DateTime, TimeSpan, IEvent)WeeklyRecurrenceRule.WeekDaysWeeklyRecurrenceRule.OffsetWeeklyRecurrenceRule.FirstDayOfWeekRecurrenceRule.DefaultEndDateRecurrenceRule.DefaultCountRecurrenceRule.CreateRule(RecurrenceType)RecurrenceRule.SuspendNotifications()RecurrenceRule.ResumeNotifications()RecurrenceRule.OnPropertyChanged(string)RecurrenceRule.IsExceptionDate(DateTime)RecurrenceRule.IsValid()RecurrenceRule.Equals(object)RecurrenceRule.GetHashCode()RecurrenceRule.ToString()RecurrenceRule.Clone()RecurrenceRule.ExceptionDatesRecurrenceRule.StartRecurrenceRule.EndRecurrenceRule.EventDurationRecurrenceRule.CountRecurrenceRule.IntervalRecurrenceRule.PropertyChanged...

Constructors

Initializes a new instance of the YearlyRecurrenceRule class.

C#
public YearlyRecurrenceRule()

Initializes a new instance of the YearlyRecurrenceRule class.

C#
public YearlyRecurrenceRule(DateTime start, int monthNumber, int dayNumber, int interval, int count)
Parameters:startDateTime

The start of the recurrence rule.

monthNumberint

The month number.

dayNumberint

The day number.

intervalint

The interval of the recurrence rule.

countint

The count.

Initializes a new instance of the YearlyRecurrenceRule class.

C#
public YearlyRecurrenceRule(DateTime start, int monthNumber, int dayNumber, int interval)
Parameters:startDateTime

The start of the recurrence rule.

monthNumberint

The month number.

dayNumberint

The day number.

intervalint

The interval of the recurrence rule.

Initializes a new instance of the YearlyRecurrenceRule class.

C#
public YearlyRecurrenceRule(DateTime start, int monthNumber, int weekNumber, WeekDays weekdays, int interval, int count)
Parameters:startDateTime

The start of the recurrence rule.

monthNumberint

The month number.

weekNumberint

The week number.

weekdaysWeekDays

The week days.

intervalint

The interval of the recurrence rule.

countint

The count.

Initializes a new instance of the YearlyRecurrenceRule class.

C#
public YearlyRecurrenceRule(DateTime start, int monthNumber, int weekNumber, WeekDays weekdays, int interval)
Parameters:startDateTime

The start of the recurrence rule.

monthNumberint

The month number.

weekNumberint

The week number.

weekdaysWeekDays

The week days.

intervalint

The interval of the recurrence rule.

Initializes a new instance of the YearlyRecurrenceRule class.

C#
public YearlyRecurrenceRule(DateTime start, int dayNumber, int interval)
Parameters:startDateTime

The start of the recurrence rule.

dayNumberint

The day number.

intervalint

The interval of the recurrence rule.

Initializes a new instance of the YearlyRecurrenceRule class.

C#
public YearlyRecurrenceRule(DateTime start, int monthNumber, WeekDays weekdays, int offset, int interval, int count)
Parameters:startDateTime

The start of the recurrence rule.

monthNumberint

The month number.

weekdaysWeekDays

The week days.

offsetint

The offset of the recurrence rule.

intervalint

The interval of the recurrence rule.

countint

The count.

Initializes a new instance of the YearlyRecurrenceRule class.

C#
public YearlyRecurrenceRule(DateTime start, int weekNumber, WeekDays weekdays, int interval, int count)
Parameters:startDateTime

The start of the recurrence rule.

weekNumberint

The week number.

weekdaysWeekDays

The week days.

intervalint

The interval of the recurrence rule.

countint

The count.

Initializes a new instance of the YearlyRecurrenceRule class.

C#
public YearlyRecurrenceRule(DateTime start, int weekNumber, WeekDays weekdays, int interval)
Parameters:startDateTime

The start of the recurrence rule.

weekNumberint

The week number.

weekdaysWeekDays

The week days.

intervalint

The interval of the recurrence rule.

Initializes a new instance of the YearlyRecurrenceRule class.

C#
public YearlyRecurrenceRule(DateTime start, WeekDays weekdays, int offset, int interval, int count)
Parameters:startDateTime

The start of the recurrence rule.

weekdaysWeekDays

The week days.

offsetint

The offset of the recurrence rule.

intervalint

The interval of the recurrence rule.

countint

The count.

Initializes a new instance of the YearlyRecurrenceRule class.

C#
public YearlyRecurrenceRule(DateTime start, WeekDays weekdays, int offset, int interval)
Parameters:startDateTime

The start of the recurrence rule.

weekdaysWeekDays

The week days.

offsetint

The offset.

intervalint

The interval of the recurrence rule.

Fields

The default month number; zero leaves month filtering unset.

C#
public static readonly int DefaultMonthNumber

Properties

Gets the type of the recurrence rule.

C#
public override RecurrenceType Frequency { get; }
Property Value:

The type of the recurrence rule.

Overrides: MonthlyRecurrenceRule.Frequency

Gets or sets the month number.

C#
public int MonthNumber { get; set; }
Property Value:

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.

C#
protected override void CopyProperties(RecurrenceRule other)
Parameters:otherRecurrenceRule

The rule that receives the copied properties.

Overrides: MonthlyRecurrenceRule.CopyProperties(RecurrenceRule)

Creates a new instance of the concrete rule type for use by Clone().

C#
protected override RecurrenceRule CreateInstance()
Returns:

RecurrenceRule

A new instance of the concrete recurrence-rule type.

Overrides: MonthlyRecurrenceRule.CreateInstance()

Compares the month number, then the inherited monthly, weekly, and shared recurrence settings. The inherited weekly comparison does not include FirstDayOfWeek.

C#
public override bool Equals(RecurrenceRule other)
Parameters:otherRecurrenceRule

The rule to compare with this yearly rule.

Returns:

bool

true when the compared settings are equal; otherwise, false.

Overrides: MonthlyRecurrenceRule.Equals(RecurrenceRule)

Gets the last day of the candidate's year for negative weekday-offset calculations.

C#
protected override DateTime GetNegativeOffsetStart(DateTime date, DateTimeFormatInfo dateTimeFormat)
Parameters:dateDateTime

A date in the year to inspect.

dateTimeFormatDateTimeFormatInfo

Culture-specific calendar information used to find the year's end.

Returns:

DateTime

The last day of the year containing date.

Overrides: MonthlyRecurrenceRule.GetNegativeOffsetStart(DateTime, DateTimeFormatInfo)

Gets the occurrence start given a occurrence index.

C#
public override DateTime GetOccurrenceStart(int index, DateTime startDate, DateTimeFormatInfo dateTimeFormat)
Parameters:indexint

The index.

startDateDateTime

The start of the recurring series.

dateTimeFormatDateTimeFormatInfo

The date time format.

Returns:

DateTime

Overrides: MonthlyRecurrenceRule.GetOccurrenceStart(int, DateTime, DateTimeFormatInfo)

Gets the first day of the candidate's year for positive weekday-offset calculations.

C#
protected override DateTime GetPositiveOffsetStart(DateTime date, DateTimeFormatInfo dateTimeFormat)
Parameters:dateDateTime

A date in the year to inspect.

dateTimeFormatDateTimeFormatInfo

Culture-specific calendar information.

Returns:

DateTime

The first day of the year containing date.

Overrides: MonthlyRecurrenceRule.GetPositiveOffsetStart(DateTime, DateTimeFormatInfo)

Checks the candidate against configured month, week, and day positions plus the weekday mask.

C#
protected override bool IsOffsetMatch(DateTime date, DateTimeFormatInfo dateTimeFormat)
Parameters:dateDateTime

The candidate date to check.

dateTimeFormatDateTimeFormatInfo

Culture-specific calendar information used for period calculations.

Returns:

bool

true when the candidate matches all applicable constraints; otherwise, false.

Overrides: MonthlyRecurrenceRule.IsOffsetMatch(DateTime, DateTimeFormatInfo)

Checks the year interval and any configured month, week, day, weekday-mask, and offset constraints.

C#
public override bool MatchAdvancedPattern(DateTime date, DateTimeFormatInfo dateTimeFormat)
Parameters:dateDateTime

The candidate occurrence date.

dateTimeFormatDateTimeFormatInfo

Culture-specific calendar information used for week calculations.

Returns:

bool

true when the candidate matches the yearly pattern; otherwise, false.

Overrides: MonthlyRecurrenceRule.MatchAdvancedPattern(DateTime, DateTimeFormatInfo)

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.

C#
protected bool MatchDayNumber(DateTime date, DateTimeFormatInfo dateTimeFormat)
Parameters:dateDateTime

The candidate date to check.

dateTimeFormatDateTimeFormatInfo

Culture-specific calendar information used to find period boundaries.

Returns:

bool

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.

C#
protected bool MatchWeekNumber(DateTime date, DateTimeFormatInfo dateTimeFormat)
Parameters:dateDateTime

The candidate date to check.

dateTimeFormatDateTimeFormatInfo

Culture-specific calendar information used to determine week numbers and week starts.

Returns:

bool

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.

C#
public override bool TryGetCloseToNextOccurrenceDate(DateTime currentDate, bool hasOccurrenceOnCurrentDate, out DateTime closeToNextDate)
Parameters:currentDateDateTime

The candidate date currently being evaluated.

hasOccurrenceOnCurrentDatebool

true when the candidate matches the rule.

closeToNextDateDateTime

When returning true, receives the next candidate date with the same time of day.

Returns:

bool

true when the enumerator can skip ahead; otherwise, false.

Overrides: MonthlyRecurrenceRule.TryGetCloseToNextOccurrenceDate(DateTime, bool, out DateTime)