00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef DTRULE_H
00010 #define DTRULE_H
00011
00012 #include "unicode/utypes.h"
00013
00019 #if !UCONFIG_NO_FORMATTING
00020
00021 #include "unicode/uobject.h"
00022
00023 U_NAMESPACE_BEGIN
00031 class U_I18N_API DateTimeRule : public UObject {
00032 public:
00033
00038 enum DateRuleType {
00039 DOM = 0,
00041 DOW,
00043 DOW_GEQ_DOM,
00045 DOW_LEQ_DOM
00047 };
00048
00053 enum TimeRuleType {
00054 WALL_TIME = 0,
00055 STANDARD_TIME,
00056 UTC_TIME
00057 };
00058
00071 DateTimeRule(int32_t month, int32_t dayOfMonth,
00072 int32_t millisInDay, TimeRuleType timeType);
00073
00089 DateTimeRule(int32_t month, int32_t weekInMonth, int32_t dayOfWeek,
00090 int32_t millisInDay, TimeRuleType timeType);
00091
00107 DateTimeRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, UBool after,
00108 int32_t millisInDay, TimeRuleType timeType);
00109
00115 DateTimeRule(const DateTimeRule& source);
00116
00121 ~DateTimeRule();
00122
00129 DateTimeRule* clone(void) const;
00130
00136 DateTimeRule& operator=(const DateTimeRule& right);
00137
00145 UBool operator==(const DateTimeRule& that) const;
00146
00154 UBool operator!=(const DateTimeRule& that) const;
00155
00161 DateRuleType getDateRuleType(void) const;
00162
00169 TimeRuleType getTimeRuleType(void) const;
00170
00176 int32_t getRuleMonth(void) const;
00177
00184 int32_t getRuleDayOfMonth(void) const;
00185
00192 int32_t getRuleDayOfWeek(void) const;
00193
00201 int32_t getRuleWeekInMonth(void) const;
00202
00208 int32_t getRuleMillisInDay(void) const;
00209
00210 private:
00211 int32_t fMonth;
00212 int32_t fDayOfMonth;
00213 int32_t fDayOfWeek;
00214 int32_t fWeekInMonth;
00215 int32_t fMillisInDay;
00216 DateRuleType fDateRuleType;
00217 TimeRuleType fTimeRuleType;
00218
00219 public:
00231 static UClassID U_EXPORT2 getStaticClassID(void);
00232
00244 virtual UClassID getDynamicClassID(void) const;
00245 };
00246
00247 U_NAMESPACE_END
00248
00249 #endif
00250
00251 #endif // DTRULE_H
00252