Aspose::Email::Calendar::Recurrences::RecurrenceRule Class Reference

Represents one recurrence or exception rule in a recurrence pattern. More...

Inherits IEquatable< System::SharedPtr< Aspose::Email::Calendar::Recurrences::RecurrenceRule > >.

Public Member Functions

System::String get_FriendlyText ()
 Gets user friendly text of rule. More...
 
System::DayOfWeek get_WeekStart () const
 Gets the starting day of the week. More...
 
void set_WeekStart (System::DayOfWeek value)
 Sets the starting day of the week. More...
 
Aspose::Email::Calendar::Recurrences::Frequency get_Frequency () const
 Gets the type of the recurrence rule. More...
 
void set_Frequency (Aspose::Email::Calendar::Recurrences::Frequency value)
 Sets the type of the recurrence rule. More...
 
int32_t get_Interval () const
 Gets the interval. More...
 
void set_Interval (int32_t value)
 Sets the interval. More...
 
Aspose::Email::Calendar::Recurrences::EndType get_EndType () const
 Gets the end type. More...
 
void set_EndType (Aspose::Email::Calendar::Recurrences::EndType value)
 Sets the end type. More...
 
int32_t get_Count () const
 Gets the count. More...
 
void set_Count (int32_t value)
 Sets the count. More...
 
System::DateTime get_Until () const
 Gets the until. More...
 
void set_Until (System::DateTime value)
 Sets the until. More...
 
System::SharedPtr< ByNumberCollectionget_BySecond ()
 Gets the by second. More...
 
System::SharedPtr< ByNumberCollectionget_ByMinute ()
 Gets the by minute. More...
 
System::SharedPtr< ByNumberCollectionget_ByHour ()
 Gets the by hour. More...
 
System::SharedPtr< ByNumberCollectionget_ByMonth ()
 Gets the by month. More...
 
System::SharedPtr< ByDayCollectionget_ByDay ()
 Gets the by day. More...
 
System::SharedPtr< ByNumberCollectionget_BySetPos ()
 Gets the by set pos. More...
 
System::SharedPtr< ByNumberCollectionget_ByMonthDay ()
 Gets the by month day. More...
 
System::SharedPtr< ByNumberCollectionget_ByYearDay ()
 Gets the by year day. More...
 
System::SharedPtr< ByNumberCollectionget_ByWeekNo ()
 Gets the by week no. More...
 
 RecurrenceRule ()
 Initializes a new instance of the RecurrenceRule class. More...
 
System::SharedPtr< DateCollectionGenerateOccurrences (System::DateTime startDate, System::DateTime rangeStart, System::DateTime rangeEnd, int32_t numberOfOccurrences)
 
System::String ToiCalendar ()
 
bool IsValidByxxx (System::DateTime d)
 Checks date on correspondence to conditions BYxxx More...
 
bool Equals (System::SharedPtr< RecurrenceRule > other) override
 Determines whether the specified RecurrenceRule is equal to this instance. More...
 
bool Equals (System::SharedPtr< System::Object > obj) override
 Determines whether the specified Object is equal to the current Object. More...
 
int32_t GetHashCode () const override
 GetHashCode returns a hash function for this object. More...
 

Static Public Member Functions

static System::SharedPtr< RecurrenceRuleFromiCalendar (System::String pattern)
 
static System::String GetDayOfWeekString (System::DayOfWeek dayOfWeek)
 

Protected Member Functions

virtual ~RecurrenceRule ()
 

Friends

class Aspose::Email::Calendar::Recurrences::CalendarRecurrence
 
class Aspose::Email::Tools::CalendarConverter
 
class Aspose::Email::Mapi::MapiTask
 
class Aspose::Email::Mapi::MapiCalendar
 
class Aspose::Email::Mapi::MapiCalendarYearlyAndMonthlyRecurrencePattern
 
class Aspose::Email::Mapi::MapiCalendarRecurrencePatternFactory
 
class Aspose::Email::Mapi::MapiCalendarWeeklyRecurrencePattern
 
class Aspose::Email::MhtMessageFormatter
 

Detailed Description

Represents one recurrence or exception rule in a recurrence pattern.

Corresponds to RRULE or EXRULE part in iCalendar.

To construct a recurrence rule, you typically need to:

1. Specify the type of the rule in Frequency.

2. Specify how the recurrence pattern ends using EndType, Count or Until.

3. Specify values in one or more ByXXX collections.

Note, that if ByXXX rule part values are found which are beyond the available scope (ie, BYMONTHDAY=30 in February), they are simply ignored.

Information, not contained in the rule, necessary to determine the various recurrence instance start time and dates are derived from CalendarRecurrence::StartDate. For example, "FREQ=YEARLY;BYMONTH=1" doesn't specify a specific day within the month or a time. This information would be the same as what is specified for DTSTART.

ByXXX rule parts modify the recurrence in some manner. ByXXX rule parts for a period of time which is the same or greater than the frequency generally reduce or limit the number of occurrences of the recurrence generated. For example, "FREQ=DAILY;BYMONTH=1" reduces the number of recurrence instances from all days (if BYMONTH tag is not present) to all days in January. ByXXX rule parts for a period of time less than the frequency generally increase or expand the number of occurrences of the recurrence. For example, "FREQ=YEARLY;BYMONTH=1,2" increases the number of days within the yearly recurrence set from 1 (if BYMONTH tag is not present) to 2.

If multiple ByXXX rule parts are specified, then after evaluating the specified Frequency and Interval rule parts, the ByXXX rule parts are applied to the current set of evaluated occurrences in the following order: ByMonth, ByWeekNo, ByYearDay, ByMonthDay, ByDay, ByHour, ByMinute, BySecond and BySetPos; then Count and Until are evaluated.

Constructor & Destructor Documentation

◆ RecurrenceRule()

Aspose::Email::Calendar::Recurrences::RecurrenceRule::RecurrenceRule ( )

Initializes a new instance of the RecurrenceRule class.

◆ ~RecurrenceRule()

virtual Aspose::Email::Calendar::Recurrences::RecurrenceRule::~RecurrenceRule ( )
protectedvirtual

Member Function Documentation

◆ Equals() [1/2]

bool Aspose::Email::Calendar::Recurrences::RecurrenceRule::Equals ( System::SharedPtr< RecurrenceRule other)
override

Determines whether the specified RecurrenceRule is equal to this instance.

Parameters
otherThe RecurrenceRule to compare with this instance.
Returns
true if the specified RecurrenceRule is equal to this instance; otherwise, false.

◆ Equals() [2/2]

bool Aspose::Email::Calendar::Recurrences::RecurrenceRule::Equals ( System::SharedPtr< System::Object >  obj)
override

Determines whether the specified Object is equal to the current Object.

Parameters
objThe Object to compare with the current Object.
Returns
Returns a boolean indicating if the passed in object obj is Equal to this.

◆ FromiCalendar()

static System::SharedPtr<RecurrenceRule> Aspose::Email::Calendar::Recurrences::RecurrenceRule::FromiCalendar ( System::String  pattern)
static

◆ GenerateOccurrences()

System::SharedPtr<DateCollection> Aspose::Email::Calendar::Recurrences::RecurrenceRule::GenerateOccurrences ( System::DateTime  startDate,
System::DateTime  rangeStart,
System::DateTime  rangeEnd,
int32_t  numberOfOccurrences 
)

◆ get_ByDay()

System::SharedPtr<ByDayCollection> Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_ByDay ( )

Gets the by day.

The by day.

◆ get_ByHour()

System::SharedPtr<ByNumberCollection> Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_ByHour ( )

Gets the by hour.

The by hour.

◆ get_ByMinute()

System::SharedPtr<ByNumberCollection> Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_ByMinute ( )

Gets the by minute.

The by minute.

◆ get_ByMonth()

System::SharedPtr<ByNumberCollection> Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_ByMonth ( )

Gets the by month.

The by month.

◆ get_ByMonthDay()

System::SharedPtr<ByNumberCollection> Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_ByMonthDay ( )

Gets the by month day.

The by month day.

◆ get_BySecond()

System::SharedPtr<ByNumberCollection> Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_BySecond ( )

Gets the by second.

The by second.

◆ get_BySetPos()

System::SharedPtr<ByNumberCollection> Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_BySetPos ( )

Gets the by set pos.

The by set pos.

◆ get_ByWeekNo()

System::SharedPtr<ByNumberCollection> Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_ByWeekNo ( )

Gets the by week no.

The by week no.

◆ get_ByYearDay()

System::SharedPtr<ByNumberCollection> Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_ByYearDay ( )

Gets the by year day.

The by year day.

◆ get_Count()

int32_t Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_Count ( ) const

Gets the count.

The count.

◆ get_EndType()

Aspose::Email::Calendar::Recurrences::EndType Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_EndType ( ) const

Gets the end type.

The end type.

◆ get_Frequency()

Aspose::Email::Calendar::Recurrences::Frequency Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_Frequency ( ) const

Gets the type of the recurrence rule.

The frequency.

◆ get_FriendlyText()

System::String Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_FriendlyText ( )

Gets user friendly text of rule.

◆ get_Interval()

int32_t Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_Interval ( ) const

Gets the interval.

The interval.

◆ get_Until()

System::DateTime Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_Until ( ) const

Gets the until.

The until.

◆ get_WeekStart()

System::DayOfWeek Aspose::Email::Calendar::Recurrences::RecurrenceRule::get_WeekStart ( ) const

Gets the starting day of the week.

◆ GetDayOfWeekString()

static System::String Aspose::Email::Calendar::Recurrences::RecurrenceRule::GetDayOfWeekString ( System::DayOfWeek  dayOfWeek)
static

◆ GetHashCode()

int32_t Aspose::Email::Calendar::Recurrences::RecurrenceRule::GetHashCode ( ) const
override

GetHashCode returns a hash function for this object.

Returns
Returns a hash function for this object.

◆ IsValidByxxx()

bool Aspose::Email::Calendar::Recurrences::RecurrenceRule::IsValidByxxx ( System::DateTime  d)

Checks date on correspondence to conditions BYxxx

Parameters
dChecked up date
Returns
Returns true if date corresponds to a conditions and false if is not present

◆ set_Count()

void Aspose::Email::Calendar::Recurrences::RecurrenceRule::set_Count ( int32_t  value)

Sets the count.

The count.

◆ set_EndType()

void Aspose::Email::Calendar::Recurrences::RecurrenceRule::set_EndType ( Aspose::Email::Calendar::Recurrences::EndType  value)

Sets the end type.

The end type.

◆ set_Frequency()

void Aspose::Email::Calendar::Recurrences::RecurrenceRule::set_Frequency ( Aspose::Email::Calendar::Recurrences::Frequency  value)

Sets the type of the recurrence rule.

The frequency.

◆ set_Interval()

void Aspose::Email::Calendar::Recurrences::RecurrenceRule::set_Interval ( int32_t  value)

Sets the interval.

The interval.

◆ set_Until()

void Aspose::Email::Calendar::Recurrences::RecurrenceRule::set_Until ( System::DateTime  value)

Sets the until.

The until.

◆ set_WeekStart()

void Aspose::Email::Calendar::Recurrences::RecurrenceRule::set_WeekStart ( System::DayOfWeek  value)

Sets the starting day of the week.

◆ ToiCalendar()

System::String Aspose::Email::Calendar::Recurrences::RecurrenceRule::ToiCalendar ( )

Friends And Related Function Documentation

◆ Aspose::Email::Calendar::Recurrences::CalendarRecurrence

◆ Aspose::Email::Mapi::MapiCalendar

friend class Aspose::Email::Mapi::MapiCalendar
friend

◆ Aspose::Email::Mapi::MapiCalendarRecurrencePatternFactory

◆ Aspose::Email::Mapi::MapiCalendarWeeklyRecurrencePattern

◆ Aspose::Email::Mapi::MapiCalendarYearlyAndMonthlyRecurrencePattern

◆ Aspose::Email::Mapi::MapiTask

friend class Aspose::Email::Mapi::MapiTask
friend

◆ Aspose::Email::MhtMessageFormatter

friend class Aspose::Email::MhtMessageFormatter
friend

◆ Aspose::Email::Tools::CalendarConverter

friend class Aspose::Email::Tools::CalendarConverter
friend