ICU 60.2 60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

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
19 #if !UCONFIG_NO_FORMATTING
20
21 #include "unicode/uobject.h"
22
23 U_NAMESPACE_BEGIN
31 class U_I18N_API DateTimeRule : public UObject {
32 public:
33
38 enum DateRuleType {
39 DOM = 0,
41 DOW,
43 DOW_GEQ_DOM,
45 DOW_LEQ_DOM
47 };
48
53 enum TimeRuleType {
54 WALL_TIME = 0,
55 STANDARD_TIME,
56 UTC_TIME
57 };
58
71 DateTimeRule(int32_t month, int32_t dayOfMonth,
72 int32_t millisInDay, TimeRuleType timeType);
73
89 DateTimeRule(int32_t month, int32_t weekInMonth, int32_t dayOfWeek,
90 int32_t millisInDay, TimeRuleType timeType);
91
107 DateTimeRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, UBool after,
108 int32_t millisInDay, TimeRuleType timeType);
109
115 DateTimeRule(const DateTimeRule& source);
116
121 ~DateTimeRule();
122
129 DateTimeRule* clone(void) const;
130
136 DateTimeRule& operator=(const DateTimeRule& right);
137
145 UBool operator==(const DateTimeRule& that) const;
146
154 UBool operator!=(const DateTimeRule& that) const;
155
161 DateRuleType getDateRuleType(void) const;
162
169 TimeRuleType getTimeRuleType(void) const;
170
176 int32_t getRuleMonth(void) const;
177
184 int32_t getRuleDayOfMonth(void) const;
185
192 int32_t getRuleDayOfWeek(void) const;
193
201 int32_t getRuleWeekInMonth(void) const;
202
208 int32_t getRuleMillisInDay(void) const;
209
210 private:
211 int32_t fMonth;
212 int32_t fDayOfMonth;
213 int32_t fDayOfWeek;
214 int32_t fWeekInMonth;
215 int32_t fMillisInDay;
216 DateRuleType fDateRuleType;
217 TimeRuleType fTimeRuleType;
218
219 public:
231 static UClassID U_EXPORT2 getStaticClassID(void);
232
244 virtual UClassID getDynamicClassID(void) const;
245 };
246
247 U_NAMESPACE_END
248
249 #endif /* #if !UCONFIG_NO_FORMATTING */
250
251 #endif // DTRULE_H
252 //eof
icu::DateTimeRule::TimeRuleType
TimeRuleType
Time rule type constants.
Definition: dtrule.h:53
icu::UObject::getDynamicClassID
virtual UClassID getDynamicClassID() const
ICU4C "poor man&#39;s RTTI", returns a UClassID for the actual ICU class.
icu::operator==
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler&#39;s RTTI.
Definition: uobject.h:93
U_I18N_API
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
Definition: utypes.h:360
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:131
icu::operator!=
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
Definition: stringpiece.h:218
uobject.h
C++ API: Common ICU base class UObject.
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:132
icu::DateTimeRule::DateRuleType
DateRuleType
Date rule type constants.
Definition: dtrule.h:38
icu::DateTimeRule
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.
Definition: dtrule.h:31
icu::DateTimeRule::STANDARD_TIME
The local standard time.
Definition: dtrule.h:55
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:223
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:236