24 #include <VCardUTCValue.h>
26 #include <VCardValue.h>
28 using namespace VCARD;
35 UTCValue::UTCValue(
const UTCValue & x)
36 : Value(x), positive_(x.positive_), hour_(x.hour_), minute_(x.minute_)
41 UTCValue::UTCValue(
const TQCString & s)
47 UTCValue::operator = (UTCValue & x)
49 if (*
this == x)
return *
this;
51 positive_ = x.positive_;
55 Value::operator = (x);
60 UTCValue::operator = (
const TQCString & s)
62 Value::operator = (s);
67 UTCValue::operator == (UTCValue & x)
71 if (positive_ != x.positive_)
return false;
72 if (hour_ != x.hour_)
return false;
73 if (minute_ != x.minute_)
return false;
85 return new UTCValue( *
this );
91 if ( strRep_.isEmpty() )
94 positive_ = ( strRep_[0] ==
'+' );
96 int colon = strRep_.find(
':' );
101 hour_ = strRep_.mid( 1, 2 ).toInt();
102 minute_ = strRep_.right( 2 ).toInt();
106 UTCValue::_assemble()
108 strRep_.sprintf(
"%c%.2i:%.2i", (positive_ ?
'+' :
'-'), hour_, minute_ );