/src/mozilla-central/intl/icu/source/common/dtintrv.cpp
Line | Count | Source (jump to first uncovered line) |
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 | | |
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 | 0 | {} |
29 | | |
30 | | |
31 | 0 | DateInterval::~DateInterval(){} |
32 | | |
33 | | |
34 | | DateInterval::DateInterval(const DateInterval& other) |
35 | 0 | : UObject(other) { |
36 | 0 | *this = other; |
37 | 0 | } |
38 | | |
39 | | |
40 | | DateInterval& |
41 | 0 | DateInterval::operator=(const DateInterval& other) { |
42 | 0 | if ( this != &other ) { |
43 | 0 | fromDate = other.fromDate; |
44 | 0 | toDate = other.toDate; |
45 | 0 | } |
46 | 0 | return *this; |
47 | 0 | } |
48 | | |
49 | | |
50 | | DateInterval* |
51 | 0 | DateInterval::clone() const { |
52 | 0 | return new DateInterval(*this); |
53 | 0 | } |
54 | | |
55 | | |
56 | | UBool |
57 | 0 | DateInterval::operator==(const DateInterval& other) const { |
58 | 0 | return ( fromDate == other.fromDate && toDate == other.toDate ); |
59 | 0 | } |
60 | | |
61 | | |
62 | | U_NAMESPACE_END |
63 | | |