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

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

Inherits Object.

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

virtual ASPOSE_EMAIL_SHARED_API ~RecurrenceRule ()
 

Friends

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

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_SHARED_API Aspose::Email::Calendar::Recurrences::RecurrenceRule::RecurrenceRule ( )

Initializes a new instance of the RecurrenceRule class.

◆ ~RecurrenceRule()

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

Member Function Documentation

◆ Equals() [1/2]

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

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]

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

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 ASPOSE_EMAIL_SHARED_API System::SharedPtr<RecurrenceRule> Aspose::Email::Calendar::Recurrences::RecurrenceRule::FromiCalendar ( System::String  pattern)
static

◆ GenerateOccurrences()

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

◆ get_ByDay()

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

Gets the by day.

The by day.

◆ get_ByHour()

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

Gets the by hour.

The by hour.

◆ get_ByMinute()

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

Gets the by minute.

The by minute.

◆ get_ByMonth()

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

Gets the by month.

The by month.

◆ get_ByMonthDay()

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

Gets the by month day.

The by month day.

◆ get_BySecond()

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

Gets the by second.

The by second.

◆ get_BySetPos()

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

Gets the by set pos.

The by set pos.

◆ get_ByWeekNo()

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

Gets the by week no.

The by week no.

◆ get_ByYearDay()

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

Gets the by year day.

The by year day.

◆ get_Count()

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

Gets the count.

The count.

◆ get_EndType()

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

Gets the end type.

The end type.

◆ get_Frequency()

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

Gets the type of the recurrence rule.

The frequency.

◆ get_FriendlyText()

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

Gets user friendly text of rule.

◆ get_Interval()

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

Gets the interval.

The interval.

◆ get_Until()

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

Gets the until.

The until.

◆ get_WeekStart()

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

Gets the starting day of the week.

◆ GetDayOfWeekString()

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

◆ GetHashCode() [1/2]

virtual ASPOSE_EMAIL_SHARED_API int32_t Aspose::Email::Calendar::Recurrences::RecurrenceRule::GetHashCode ( )
virtual

GetHashCode returns a hash function for this object.

Returns
Returns a hash function for this object.

◆ GetHashCode() [2/2]

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

◆ IsValidByxxx()

ASPOSE_EMAIL_SHARED_API 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()

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

Sets the count.

The count.

◆ set_EndType()

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

Sets the end type.

The end type.

◆ set_Frequency()

ASPOSE_EMAIL_SHARED_API 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()

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

Sets the interval.

The interval.

◆ set_Until()

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

Sets the until.

The until.

◆ set_WeekStart()

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

Sets the starting day of the week.

◆ ToiCalendar()

ASPOSE_EMAIL_SHARED_API 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

friend class Aspose::Email::Mapi::MapiCalendarWeeklyRecurrencePattern
friend

◆ Aspose::Email::Mapi::MapiCalendarYearlyAndMonthlyRecurrencePattern

◆ Aspose::Email::Mapi::MapiTask

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

◆ Aspose::Email::MhtMessageFormatter

friend class Aspose::Email::MhtMessageFormatter
friend