|
ICU 73.2
73.2
|
00001 // © 2016 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 /* 00004 ******************************************************************************* 00005 * Copyright (C) 2007-2008, International Business Machines Corporation and * 00006 * others. All Rights Reserved. * 00007 ******************************************************************************* 00008 */ 00009 #ifndef DTRULE_H 00010 #define DTRULE_H 00011 00012 #include "unicode/utypes.h" 00013 00014 #if U_SHOW_CPLUSPLUS_API 00015 00021 #if !UCONFIG_NO_FORMATTING 00022 00023 #include "unicode/uobject.h" 00024 00025 U_NAMESPACE_BEGIN 00033 class U_I18N_API DateTimeRule : public UObject { 00034 public: 00035 00040 enum DateRuleType { 00041 DOM = 0, 00043 DOW, 00045 DOW_GEQ_DOM, 00047 DOW_LEQ_DOM 00049 }; 00050 00055 enum TimeRuleType { 00056 WALL_TIME = 0, 00057 STANDARD_TIME, 00058 UTC_TIME 00059 }; 00060 00073 DateTimeRule(int32_t month, int32_t dayOfMonth, 00074 int32_t millisInDay, TimeRuleType timeType); 00075 00091 DateTimeRule(int32_t month, int32_t weekInMonth, int32_t dayOfWeek, 00092 int32_t millisInDay, TimeRuleType timeType); 00093 00109 DateTimeRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, UBool after, 00110 int32_t millisInDay, TimeRuleType timeType); 00111 00117 DateTimeRule(const DateTimeRule& source); 00118 00123 ~DateTimeRule(); 00124 00131 DateTimeRule* clone() const; 00132 00138 DateTimeRule& operator=(const DateTimeRule& right); 00139 00147 bool operator==(const DateTimeRule& that) const; 00148 00156 bool operator!=(const DateTimeRule& that) const; 00157 00163 DateRuleType getDateRuleType(void) const; 00164 00171 TimeRuleType getTimeRuleType(void) const; 00172 00178 int32_t getRuleMonth(void) const; 00179 00186 int32_t getRuleDayOfMonth(void) const; 00187 00194 int32_t getRuleDayOfWeek(void) const; 00195 00203 int32_t getRuleWeekInMonth(void) const; 00204 00210 int32_t getRuleMillisInDay(void) const; 00211 00212 private: 00213 int32_t fMonth; 00214 int32_t fDayOfMonth; 00215 int32_t fDayOfWeek; 00216 int32_t fWeekInMonth; 00217 int32_t fMillisInDay; 00218 DateRuleType fDateRuleType; 00219 TimeRuleType fTimeRuleType; 00220 00221 public: 00233 static UClassID U_EXPORT2 getStaticClassID(void); 00234 00246 virtual UClassID getDynamicClassID(void) const override; 00247 }; 00248 00249 U_NAMESPACE_END 00250 00251 #endif /* #if !UCONFIG_NO_FORMATTING */ 00252 00253 #endif /* U_SHOW_CPLUSPLUS_API */ 00254 00255 #endif // DTRULE_H 00256 //eof
1.7.6.1