1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
3/*******************************************************************************
4* Copyright (C) 2008, International Business Machines Corporation and
5* others. All Rights Reserved.
6*******************************************************************************
7*
8* File DTINTRV.CPP
9*
10*******************************************************************************
11*/
12
13
14
15#include "unicode/dtintrv.h"
16
17
18U_NAMESPACE_BEGIN
19
20UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DateInterval)
21
22//DateInterval::DateInterval(){}
23
24
25DateInterval::DateInterval(UDate from, UDate to)
26: fromDate(from),
27 toDate(to)
28{}
29
30
31DateInterval::~DateInterval(){}
32
33
34DateInterval::DateInterval(const DateInterval& other)
35: UObject(other) {
36 *this = other;
37}
38
39
40DateInterval&
41DateInterval::operator=(const DateInterval& other) {
42 if ( this != &other ) {
43 fromDate = other.fromDate;
44 toDate = other.toDate;
45 }
46 return *this;
47}
48
49
50DateInterval*
51DateInterval::clone() const {
52 return new DateInterval(*this);
53}
54
55
56UBool
57DateInterval::operator==(const DateInterval& other) const {
58 return ( fromDate == other.fromDate && toDate == other.toDate );
59}
60
61
62U_NAMESPACE_END
63
64