ICU 57.1 57.1
dtrule.h
Go to the documentation of this file.
1/*
2*******************************************************************************
3* Copyright (C) 2007-2008, International Business Machines Corporation and *
4* others. All Rights Reserved. *
5*******************************************************************************
6*/
7#ifndef DTRULE_H
8#define DTRULE_H
9
10#include "unicode/utypes.h"
11
17#if !UCONFIG_NO_FORMATTING
18
19#include "unicode/uobject.h"
20
30public:
31
37 DOM = 0,
39 DOW,
41 DOW_GEQ_DOM,
43 DOW_LEQ_DOM
45 };
46
52 WALL_TIME = 0,
54 UTC_TIME
55 };
56
71
89
107
114
120
127 DateTimeRule* clone(void) const;
128
135
144
153
160
168
175
183
191
200
207
208private:
209 int32_t fMonth;
210 int32_t fDayOfMonth;
211 int32_t fDayOfWeek;
212 int32_t fWeekInMonth;
213 int32_t fMillisInDay;
214 DateRuleType fDateRuleType;
215 TimeRuleType fTimeRuleType;
216
217public:
230
242 virtual UClassID getDynamicClassID(void) const;
243};
244
246
247#endif /* #if !UCONFIG_NO_FORMATTING */
248
249#endif // DTRULE_H
250//eof
DateTimeRule is a class representing a time in a year by a rule specified by month,...
Definition dtrule.h:29
DateTimeRule * clone(void) const
Clone this DateTimeRule object polymorphically.
virtual UClassID getDynamicClassID(void) const
Returns a unique class ID POLYMORPHICALLY.
~DateTimeRule()
Destructor.
DateRuleType
Date rule type constants.
Definition dtrule.h:36
TimeRuleType
Time rule type constants.
Definition dtrule.h:51
@ STANDARD_TIME
The local standard time.
Definition dtrule.h:53
int32_t getRuleMonth(void) const
Gets the rule month.
DateTimeRule(const DateTimeRule &source)
Copy constructor.
int32_t getRuleMillisInDay(void) const
Gets the rule time in the rule day.
DateRuleType getDateRuleType(void) const
Gets the date rule type, such as DOM
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...
UBool operator!=(const DateTimeRule &that) const
Return true if the given DateTimeRule objects are semantically unequal.
TimeRuleType getTimeRuleType(void) const
Gets the time rule type.
UBool operator==(const DateTimeRule &that) const
Return true if the given DateTimeRule objects are semantically equal.
DateTimeRule(int32_t month, int32_t dayOfMonth, int32_t millisInDay, TimeRuleType timeType)
Constructs a DateTimeRule by the day of month and the time rule.
DateTimeRule & operator=(const DateTimeRule &right)
Assignment operator.
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 oridinal number and the time rule.
int32_t getRuleDayOfWeek(void) const
Gets the rule day of week.
int32_t getRuleDayOfMonth(void) const
Gets the rule day of month.
int32_t getRuleWeekInMonth(void) const
Gets the ordinal number of the occurence of the day of week in the month.
static UClassID getStaticClassID(void)
Return the class ID for this class.
"Smart pointer" base class; do not use directly: use LocalPointer etc.
UObject is the common ICU "boilerplate" class.
Definition uobject.h:221
C++ API: Common ICU base class UObject.
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:358
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition uversion.h:130
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:129