intl/icu/source/common/dtintrv.cpp

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

     1 /*******************************************************************************
     2 * Copyright (C) 2008, International Business Machines Corporation and
     3 * others. All Rights Reserved.
     4 *******************************************************************************
     5 *
     6 * File DTINTRV.CPP 
     7 *
     8 *******************************************************************************
     9 */
    13 #include "unicode/dtintrv.h"
    16 U_NAMESPACE_BEGIN
    18 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DateInterval)
    20 //DateInterval::DateInterval(){}
    23 DateInterval::DateInterval(UDate from, UDate to)
    24 :   fromDate(from),
    25     toDate(to)
    26 {}
    29 DateInterval::~DateInterval(){}
    32 DateInterval::DateInterval(const DateInterval& other)
    33 : UObject(other) {
    34     *this = other;
    35 }   
    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 }
    48 DateInterval* 
    49 DateInterval::clone() const {
    50     return new DateInterval(*this);
    51 }
    54 UBool 
    55 DateInterval::operator==(const DateInterval& other) const { 
    56     return ( fromDate == other.fromDate && toDate == other.toDate );
    57 }
    60 U_NAMESPACE_END

mercurial