]> git.saurik.com Git - apple/icu.git/blob - icuSources/common/dtintrv.cpp
ICU-551.30.tar.gz
[apple/icu.git] / icuSources / common / dtintrv.cpp
1 /*******************************************************************************
2 * Copyright (C) 2008, International Business Machines Corporation and
3 * others. All Rights Reserved.
4 *******************************************************************************
5 *
6 * File DTINTRV.CPP
7 *
8 *******************************************************************************
9 */
10
11
12
13 #include "unicode/dtintrv.h"
14
15
16 U_NAMESPACE_BEGIN
17
18 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DateInterval)
19
20 //DateInterval::DateInterval(){}
21
22
23 DateInterval::DateInterval(UDate from, UDate to)
24 : fromDate(from),
25 toDate(to)
26 {}
27
28
29 DateInterval::~DateInterval(){}
30
31
32 DateInterval::DateInterval(const DateInterval& other)
33 : UObject(other) {
34 *this = other;
35 }
36
37
38 DateInterval&
39 DateInterval::operator=(const DateInterval& other) {
40 if ( this != &other ) {
41 fromDate = other.fromDate;
42 toDate = other.toDate;
43 }
44 return *this;
45 }
46
47
48 DateInterval*
49 DateInterval::clone() const {
50 return new DateInterval(*this);
51 }
52
53
54 UBool
55 DateInterval::operator==(const DateInterval& other) const {
56 return ( fromDate == other.fromDate && toDate == other.toDate );
57 }
58
59
60 U_NAMESPACE_END
61