A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1DateTimeRule.html below:

ICU 77.1: icu::DateTimeRule Class Reference

DateTimeRule is a class representing a time in a year by a rule specified by month, day of month, day of week and time in the day. More...

#include <dtrule.h>

  DateTimeRule (int32_t month, int32_t dayOfMonth, int32_t millisInDay, TimeRuleType timeType)   Constructs a DateTimeRule by the day of month and the time rule. More...
    DateTimeRule (int32_t month, int32_t weekInMonth, int32_t dayOfWeek, int32_t millisInDay, TimeRuleType timeType)   Constructs a DateTimeRule by the day of week and its ordinal number and the time rule. More...
    DateTimeRule (int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, UBool after, int32_t millisInDay, TimeRuleType timeType)   Constructs a DateTimeRule by the first/last day of week on or after/before the day of month and the time rule. More...
    DateTimeRule (const DateTimeRule &source)   Copy constructor. More...
    ~DateTimeRule ()   Destructor. More...
  DateTimeRuleclone () const   Clone this DateTimeRule object polymorphically. More...
  DateTimeRuleoperator= (const DateTimeRule &right)   Assignment operator. More...
  bool  operator== (const DateTimeRule &that) const   Return true if the given DateTimeRule objects are semantically equal. More...
  bool  operator!= (const DateTimeRule &that) const   Return true if the given DateTimeRule objects are semantically unequal. More...
  DateRuleType  getDateRuleType () const   Gets the date rule type, such as DOM More...
  TimeRuleType  getTimeRuleType () const   Gets the time rule type. More...
  int32_t  getRuleMonth () const   Gets the rule month. More...
  int32_t  getRuleDayOfMonth () const   Gets the rule day of month. More...
  int32_t  getRuleDayOfWeek () const   Gets the rule day of week. More...
  int32_t  getRuleWeekInMonth () const   Gets the ordinal number of the occurrence of the day of week in the month. More...
  int32_t  getRuleMillisInDay () const   Gets the rule time in the rule day. More...
  virtual UClassID  getDynamicClassID () const override   Returns a unique class ID POLYMORPHICALLY. More...
  virtual  ~UObject ()   Destructor. More...
 

DateTimeRule is a class representing a time in a year by a rule specified by month, day of month, day of week and time in the day.

Stable:
ICU 3.8

Definition at line 33 of file dtrule.h.

◆ DateRuleType

Date rule type constants.

Stable:
ICU 3.8
Enumerator DOM 

The exact day of month, for example, March 11.

DOW 

The Nth occurrence of the day of week, for example, 2nd Sunday in March.

DOW_GEQ_DOM 

The first occurrence of the day of week on or after the day of monnth, for example, first Sunday on or after March 8.

DOW_LEQ_DOM 

The last occurrence of the day of week on or before the day of month, for example, first Sunday on or before March 14.

Definition at line 40 of file dtrule.h.

◆ TimeRuleType

Time rule type constants.

Stable:
ICU 3.8
Enumerator WALL_TIME 

The local wall clock time.

STANDARD_TIME 

The local standard time.

UTC_TIME 

The UTC time.

Definition at line 55 of file dtrule.h.

◆ DateTimeRule() [1/4] icu::DateTimeRule::DateTimeRule ( int32_t  month, int32_t  dayOfMonth, int32_t  millisInDay, TimeRuleType  timeType  )

Constructs a DateTimeRule by the day of month and the time rule.

The date rule type for an instance created by this constructor is DOM.

Parameters
month The rule month, for example, Calendar::JANUARY dayOfMonth The day of month, 1-based. millisInDay The milliseconds in the rule date. timeType The time type, WALL_TIME or STANDARD_TIME or UTC_TIME.
Stable:
ICU 3.8
◆ DateTimeRule() [2/4] icu::DateTimeRule::DateTimeRule ( int32_t  month, int32_t  weekInMonth, int32_t  dayOfWeek, int32_t  millisInDay, TimeRuleType  timeType  )

Constructs a DateTimeRule by the day of week and its ordinal number and the time rule.

The date rule type for an instance created by this constructor is DOW.

Parameters
month The rule month, for example, Calendar::JANUARY. weekInMonth The ordinal number of the day of week. Negative number may be used for specifying a rule date counted from the end of the rule month. dayOfWeek The day of week, for example, Calendar::SUNDAY. millisInDay The milliseconds in the rule date. timeType The time type, WALL_TIME or STANDARD_TIME or UTC_TIME.
Stable:
ICU 3.8
◆ DateTimeRule() [3/4] icu::DateTimeRule::DateTimeRule ( int32_t  month, int32_t  dayOfMonth, int32_t  dayOfWeek, UBool  after, int32_t  millisInDay, TimeRuleType  timeType  )

Constructs a DateTimeRule by the first/last day of week on or after/before the day of month and the time rule.

The date rule type for an instance created by this constructor is either DOM_GEQ_DOM or DOM_LEQ_DOM.

Parameters
month The rule month, for example, Calendar::JANUARY dayOfMonth The day of month, 1-based. dayOfWeek The day of week, for example, Calendar::SUNDAY. after true if the rule date is on or after the day of month. millisInDay The milliseconds in the rule date. timeType The time type, WALL_TIME or STANDARD_TIME or UTC_TIME.
Stable:
ICU 3.8
◆ DateTimeRule() [4/4] icu::DateTimeRule::DateTimeRule ( const DateTimeRulesource )

Copy constructor.

Parameters
Stable:
ICU 3.8
◆ ~DateTimeRule() icu::DateTimeRule::~DateTimeRule ( ) ◆ clone()

Clone this DateTimeRule object polymorphically.

The caller owns the result and should delete it when done.

Returns
A copy of the object.
Stable:
ICU 3.8
◆ getDateRuleType()

Gets the date rule type, such as DOM

Returns
The date rule type.
Stable:
ICU 3.8
◆ getDynamicClassID() virtual UClassID icu::DateTimeRule::getDynamicClassID ( ) const overridevirtual

Returns a unique class ID POLYMORPHICALLY.

Pure virtual override. This method is to implement a simple version of RTTI, since not all C++ compilers support genuine RTTI. Polymorphic operator==() and clone() methods call this method.

Returns
The class ID for this object. All objects of a given class have the same class ID. Objects of other classes have different class IDs.
Stable:
ICU 3.8

Reimplemented from icu::UObject.

◆ getRuleDayOfMonth() int32_t icu::DateTimeRule::getRuleDayOfMonth ( ) const

Gets the rule day of month.

When the date rule type is DOW, the value is always 0.

Returns
The rule day of month
Stable:
ICU 3.8
◆ getRuleDayOfWeek() int32_t icu::DateTimeRule::getRuleDayOfWeek ( ) const

Gets the rule day of week.

When the date rule type is DOM, the value is always 0.

Returns
The rule day of week.
Stable:
ICU 3.8
◆ getRuleMillisInDay() int32_t icu::DateTimeRule::getRuleMillisInDay ( ) const

Gets the rule time in the rule day.

Returns
The time in the rule day in milliseconds.
Stable:
ICU 3.8
◆ getRuleMonth() int32_t icu::DateTimeRule::getRuleMonth ( ) const

Gets the rule month.

Returns
The rule month.
Stable:
ICU 3.8
◆ getRuleWeekInMonth() int32_t icu::DateTimeRule::getRuleWeekInMonth ( ) const

Gets the ordinal number of the occurrence of the day of week in the month.

When the date rule type is not DOW, the value is always 0.

Returns
The rule day of week ordinal number in the month.
Stable:
ICU 3.8
◆ getStaticClassID() static UClassID icu::DateTimeRule::getStaticClassID ( ) static

Return the class ID for this class.

This is useful only for comparing to a return value from getDynamicClassID(). For example:

.   Base* polymorphic_pointer = createPolymorphicObject();
.   if (polymorphic_pointer->getDynamicClassID() ==
.       erived::getStaticClassID()) ...
Returns
The class ID for all objects of this class.
Stable:
ICU 3.8
◆ getTimeRuleType()

Gets the time rule type.

Returns
The time rule type, either WALL_TIME or STANDARD_TIME or UTC_TIME.
Stable:
ICU 3.8
◆ operator!=() bool icu::DateTimeRule::operator!= ( const DateTimeRulethat ) const

Return true if the given DateTimeRule objects are semantically unequal.

Objects of different subclasses are considered unequal.

Parameters
that The object to be compared with.
Returns
true if the given DateTimeRule objects are semantically unequal.
Stable:
ICU 3.8
◆ operator=()

Assignment operator.

Parameters
right The object to be copied.
Stable:
ICU 3.8
◆ operator==() bool icu::DateTimeRule::operator== ( const DateTimeRulethat ) const

Return true if the given DateTimeRule objects are semantically equal.

Objects of different subclasses are considered unequal.

Parameters
that The object to be compared with.
Returns
true if the given DateTimeRule objects are semantically equal.
Stable:
ICU 3.8

The documentation for this class was generated from the following file:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4