ICU 75.1 75.1
Loading...
Searching...
No Matches
dtrule.h
Go to the documentation of this file.
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
3/*
4*******************************************************************************
5* Copyright (C) 2007-2008, International Business Machines Corporation and *
6* others. All Rights Reserved. *
7*******************************************************************************
8*/
9#ifndef DTRULE_H
10#define DTRULE_H
11
12#include "unicode/utypes.h"
13
14#if U_SHOW_CPLUSPLUS_API
15
21#if !UCONFIG_NO_FORMATTING
22
23#include "unicode/uobject.h"
24
25U_NAMESPACE_BEGIN
34public:
35
41 DOM = 0,
43 DOW,
45 DOW_GEQ_DOM,
47 DOW_LEQ_DOM
49 };
50
56 WALL_TIME = 0,
58 UTC_TIME
59 };
60
75
93
111
118
124
132
139
147 bool operator==(const DateTimeRule& that) const;
148
156 bool operator!=(const DateTimeRule& that) const;
157
164
172
179
187
195
204
211
212 private:
213 int32_t fMonth;
214 int32_t fDayOfMonth;
215 int32_t fDayOfWeek;
216 int32_t fWeekInMonth;
217 int32_t fMillisInDay;
218 DateRuleType fDateRuleType;
219 TimeRuleType fTimeRuleType;
220
221public:
234
246 virtual UClassID getDynamicClassID() const override;
247};
248
250
251#endif /* #if !UCONFIG_NO_FORMATTING */
252
253#endif /* U_SHOW_CPLUSPLUS_API */
254
255#endif // DTRULE_H
256//eof
DateTimeRule is a class representing a time in a year by a rule specified by month,...
Definition dtrule.h:33
DateTimeRule * clone() const
Clone this DateTimeRule object polymorphically.
static UClassID getStaticClassID()
Return the class ID for this class.
DateRuleType getDateRuleType() const
Gets the date rule type, such as DOM
int32_t getRuleDayOfMonth() const
Gets the rule day of month.
DateRuleType
Date rule type constants.
Definition dtrule.h:40
int32_t getRuleWeekInMonth() const
Gets the ordinal number of the occurrence of the day of week in the month.
bool operator==(const DateTimeRule &that) const
Return true if the given DateTimeRule objects are semantically equal.
DateTimeRule(const DateTimeRule &source)
Copy constructor.
TimeRuleType getTimeRuleType() const
Gets the time rule type.
DateTimeRule & operator=(const DateTimeRule &right)
Assignment operator.
virtual UClassID getDynamicClassID() const override
Returns a unique class ID POLYMORPHICALLY.
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.
TimeRuleType
Time rule type constants.
Definition dtrule.h:55
@ STANDARD_TIME
The local standard time.
Definition dtrule.h:57
bool operator!=(const DateTimeRule &that) const
Return true if the given DateTimeRule objects are semantically unequal.
int32_t getRuleMillisInDay() const
Gets the rule time in the rule day.
~DateTimeRule()
Destructor.
DateTimeRule(int32_t month, int32_t dayOfMonth, int32_t millisInDay, TimeRuleType timeType)
Constructs a DateTimeRule by the day of month and the time rule.
int32_t getRuleMonth() const
Gets the rule month.
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 t...
int32_t getRuleDayOfWeek() const
Gets the rule day of week.
"Smart pointer" base class; do not use directly: use LocalPointer etc.
UObject is the common ICU "boilerplate" class.
Definition uobject.h:223
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition umachine.h:247
C++ API: Common ICU base class UObject.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition uobject.h:96
Basic definitions for ICU, for both C and C++ APIs.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition utypes.h:301