00001 // © 2016 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 /* 00004 ******************************************************************************* 00005 * Copyright (C) 2008-2009, International Business Machines Corporation and 00006 * others. All Rights Reserved. 00007 ******************************************************************************* 00008 * 00009 * File DTINTRV.H 00010 * 00011 ******************************************************************************* 00012 */ 00013 00014 #ifndef __DTINTRV_H__ 00015 #define __DTINTRV_H__ 00016 00017 #include "unicode/utypes.h" 00018 #include "unicode/uobject.h" 00019 00026 U_NAMESPACE_BEGIN 00027 00028 00034 class U_COMMON_API DateInterval : public UObject { 00035 public: 00036 00043 DateInterval(UDate fromDate, UDate toDate); 00044 00049 virtual ~DateInterval(); 00050 00056 UDate getFromDate() const; 00057 00063 UDate getToDate() const; 00064 00065 00077 static UClassID U_EXPORT2 getStaticClassID(void); 00078 00090 virtual UClassID getDynamicClassID(void) const; 00091 00092 00097 DateInterval(const DateInterval& other); 00098 00103 DateInterval& operator=(const DateInterval&); 00104 00110 virtual UBool operator==(const DateInterval& other) const; 00111 00117 UBool operator!=(const DateInterval& other) const; 00118 00119 00126 virtual DateInterval* clone() const; 00127 00128 private: 00132 DateInterval(); 00133 00134 UDate fromDate; 00135 UDate toDate; 00136 00137 } ;// end class DateInterval 00138 00139 00140 inline UDate 00141 DateInterval::getFromDate() const { 00142 return fromDate; 00143 } 00144 00145 00146 inline UDate 00147 DateInterval::getToDate() const { 00148 return toDate; 00149 } 00150 00151 00152 inline UBool 00153 DateInterval::operator!=(const DateInterval& other) const { 00154 return ( !operator==(other) ); 00155 } 00156 00157 00158 U_NAMESPACE_END 00159 00160 #endif
1.6.1