Aspose::Email::Calendar::Recurrences::ByDay Class Reference

Represents Nth occurrence (or all occurrences) of the specified day of the week. More...

Inherits Object.

Public Member Functions

ASPOSE_EMAIL_SHARED_API int32_t get_NthOccurrence () const
 Gets the nth occurrence of the day of the week. More...
 
ASPOSE_EMAIL_SHARED_API void set_NthOccurrence (int32_t value)
 Sets the nth occurrence of the day of the week. More...
 
ASPOSE_EMAIL_SHARED_API System::DayOfWeek get_DayOfWeek () const
 Gets the day of the week. More...
 
ASPOSE_EMAIL_SHARED_API void set_DayOfWeek (System::DayOfWeek value)
 Sets the day of the week. More...
 
ASPOSE_EMAIL_SHARED_API bool get_IsAllOccurrences ()
 Returns True when NthOccurrence is zero (meaning all occurrences of this day of week). More...
 
ASPOSE_EMAIL_SHARED_API ByDay (System::DayOfWeek dayOfWeek)
 Initializes a new instance of ByDay class. More...
 
ASPOSE_EMAIL_SHARED_API ByDay (int32_t nthOccurrence, System::DayOfWeek dayOfWeek)
 Initializes a new instance of ByDay class. 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 () const
 GetHashCode returns a hash function for this object. More...
 

Protected Member Functions

virtual ASPOSE_EMAIL_SHARED_API bool Equals_ (System::SharedPtr< ByDay > other)
 Determines whether the specified ByDay is equal to this instance. More...
 
virtual ASPOSE_EMAIL_SHARED_API ~ByDay ()
 

Friends

class System::ObjectExt
 

Detailed Description

Represents Nth occurrence (or all occurrences) of the specified day of the week.

Corresponds to one day of the week specified in the BYDAY part of a recurrence rule.

Can be used in a monthly or yearly recurrence rule to specify Nth occurrence (or all occurrences) of the specified day of the week in a month or year.

BYDAY=MO represents all Mondays of the month or year. To represent all occurrences, set NthOccurrence to 0.

BYDAY=2MO represents 2nd Monday in a month or year.

BYDAY=-1MO represents the last Monday of a month or year.

Constructor & Destructor Documentation

◆ ByDay() [1/2]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Calendar::Recurrences::ByDay::ByDay ( System::DayOfWeek  dayOfWeek)

Initializes a new instance of ByDay class.

Parameters
dayOfWeekA day of the week.

◆ ByDay() [2/2]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Calendar::Recurrences::ByDay::ByDay ( int32_t  nthOccurrence,
System::DayOfWeek  dayOfWeek 
)

Initializes a new instance of ByDay class.

Parameters
nthOccurrenceThe nth occurrence of the day of the week.
dayOfWeekA day of the week.

◆ ~ByDay()

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

Member Function Documentation

◆ Equals()

virtual ASPOSE_EMAIL_SHARED_API bool Aspose::Email::Calendar::Recurrences::ByDay::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.

◆ Equals_()

virtual ASPOSE_EMAIL_SHARED_API bool Aspose::Email::Calendar::Recurrences::ByDay::Equals_ ( System::SharedPtr< ByDay other)
protectedvirtual

Determines whether the specified ByDay is equal to this instance.

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

◆ get_DayOfWeek()

ASPOSE_EMAIL_SHARED_API System::DayOfWeek Aspose::Email::Calendar::Recurrences::ByDay::get_DayOfWeek ( ) const

Gets the day of the week.

◆ get_IsAllOccurrences()

ASPOSE_EMAIL_SHARED_API bool Aspose::Email::Calendar::Recurrences::ByDay::get_IsAllOccurrences ( )

Returns True when NthOccurrence is zero (meaning all occurrences of this day of week).

◆ get_NthOccurrence()

ASPOSE_EMAIL_SHARED_API int32_t Aspose::Email::Calendar::Recurrences::ByDay::get_NthOccurrence ( ) const

Gets the nth occurrence of the day of the week.

Valid range for this property is from -53 to 53.

Positive values represent Nth occurrence from the beginning of the period, for example NthOccurrence = 1, represents 1st occurrence of the day of the week.

Negative values represent Nth occurrence from the end of the period, for example NthOccurrence = -1, represents last occurrence of the day of the week.

When NthOccurrence is zero, it represents all occurrences of the specified day of the week. For example, BYDAY=MO has NthOccurrence zero and represents all Mondays in the set.

◆ GetHashCode()

virtual ASPOSE_EMAIL_SHARED_API int32_t Aspose::Email::Calendar::Recurrences::ByDay::GetHashCode ( ) const
virtual

GetHashCode returns a hash function for this object.

Returns
Returns a hash function for this object.

◆ set_DayOfWeek()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Calendar::Recurrences::ByDay::set_DayOfWeek ( System::DayOfWeek  value)

Sets the day of the week.

◆ set_NthOccurrence()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Calendar::Recurrences::ByDay::set_NthOccurrence ( int32_t  value)

Sets the nth occurrence of the day of the week.

Valid range for this property is from -53 to 53.

Positive values represent Nth occurrence from the beginning of the period, for example NthOccurrence = 1, represents 1st occurrence of the day of the week.

Negative values represent Nth occurrence from the end of the period, for example NthOccurrence = -1, represents last occurrence of the day of the week.

When NthOccurrence is zero, it represents all occurrences of the specified day of the week. For example, BYDAY=MO has NthOccurrence zero and represents all Mondays in the set.

Friends And Related Function Documentation

◆ System::ObjectExt

friend class System::ObjectExt
friend