• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
18 U_NAMESPACE_BEGIN
19 
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DateInterval)20 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DateInterval)
21 
22 //DateInterval::DateInterval(){}
23 
24 
25 DateInterval::DateInterval(UDate from, UDate to)
26 :   fromDate(from),
27     toDate(to)
28 {}
29 
30 
~DateInterval()31 DateInterval::~DateInterval(){}
32 
33 
DateInterval(const DateInterval & other)34 DateInterval::DateInterval(const DateInterval& other)
35 : UObject(other) {
36     *this = other;
37 }
38 
39 
40 DateInterval&
operator =(const DateInterval & other)41 DateInterval::operator=(const DateInterval& other) {
42     if ( this != &other ) {
43         fromDate = other.fromDate;
44         toDate = other.toDate;
45     }
46     return *this;
47 }
48 
49 
50 DateInterval*
clone() const51 DateInterval::clone() const {
52     return new DateInterval(*this);
53 }
54 
55 
56 UBool
operator ==(const DateInterval & other) const57 DateInterval::operator==(const DateInterval& other) const {
58     return ( fromDate == other.fromDate && toDate == other.toDate );
59 }
60 
61 
62 U_NAMESPACE_END
63 
64