1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/common/dtintrv.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,61 @@ 1.4 +/******************************************************************************* 1.5 +* Copyright (C) 2008, International Business Machines Corporation and 1.6 +* others. All Rights Reserved. 1.7 +******************************************************************************* 1.8 +* 1.9 +* File DTINTRV.CPP 1.10 +* 1.11 +******************************************************************************* 1.12 +*/ 1.13 + 1.14 + 1.15 + 1.16 +#include "unicode/dtintrv.h" 1.17 + 1.18 + 1.19 +U_NAMESPACE_BEGIN 1.20 + 1.21 +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DateInterval) 1.22 + 1.23 +//DateInterval::DateInterval(){} 1.24 + 1.25 + 1.26 +DateInterval::DateInterval(UDate from, UDate to) 1.27 +: fromDate(from), 1.28 + toDate(to) 1.29 +{} 1.30 + 1.31 + 1.32 +DateInterval::~DateInterval(){} 1.33 + 1.34 + 1.35 +DateInterval::DateInterval(const DateInterval& other) 1.36 +: UObject(other) { 1.37 + *this = other; 1.38 +} 1.39 + 1.40 + 1.41 +DateInterval& 1.42 +DateInterval::operator=(const DateInterval& other) { 1.43 + if ( this != &other ) { 1.44 + fromDate = other.fromDate; 1.45 + toDate = other.toDate; 1.46 + } 1.47 + return *this; 1.48 +} 1.49 + 1.50 + 1.51 +DateInterval* 1.52 +DateInterval::clone() const { 1.53 + return new DateInterval(*this); 1.54 +} 1.55 + 1.56 + 1.57 +UBool 1.58 +DateInterval::operator==(const DateInterval& other) const { 1.59 + return ( fromDate == other.fromDate && toDate == other.toDate ); 1.60 +} 1.61 + 1.62 + 1.63 +U_NAMESPACE_END 1.64 +