]> git.saurik.com Git - apple/icu.git/blame - icuSources/common/dtintrv.cpp
ICU-400.42.tar.gz
[apple/icu.git] / icuSources / common / dtintrv.cpp
CommitLineData
46f4442e
A
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
16U_NAMESPACE_BEGIN
17
18UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DateInterval)
19
20//DateInterval::DateInterval(){}
21
22
23DateInterval::DateInterval(UDate from, UDate to)
24: fromDate(from),
25 toDate(to)
26{}
27
28
29DateInterval::~DateInterval(){}
30
31
32DateInterval::DateInterval(const DateInterval& other)
33: UObject(other) {
34 *this = other;
35}
36
37
38DateInterval&
39DateInterval::operator=(const DateInterval& other) {
40 if ( this != &other ) {
41 fromDate = other.fromDate;
42 toDate = other.toDate;
43 }
44 return *this;
45}
46
47
48DateInterval*
49DateInterval::clone() const {
50 return new DateInterval(*this);
51}
52
53
54UBool
55DateInterval::operator==(const DateInterval& other) const {
56 return ( fromDate == other.fromDate && toDate == other.toDate );
57}
58
59
60U_NAMESPACE_END
61