A class to represent date duration. More...
#include <DateDuration.h>
Public Member Functions | |
AbstractData * | clone () const |
It returns a clone of this object. More... | |
DateDuration () | |
Empty constructor. More... | |
DateDuration (long dd) | |
Constructor. More... | |
DateDuration (const boost::gregorian::date_duration &dd) | |
Constructor. More... | |
const boost::gregorian::date_duration & | getDateDuration () const |
It returns the boost date duration type. More... | |
boost::gregorian::date_duration & | getDateDuration () |
It returns the boost date duration type. More... | |
DateTimeType | getDateTimeType () const |
It returns the subtype of the date and time type. More... | |
int | getTypeCode () const |
It returns the data type code associated to date and time values: DATETIME_TYPE. More... | |
bool | operator!= (const DateTime &rhs) const |
Operator !=. More... | |
bool | operator< (const DateTime &rhs) const |
Operator <. More... | |
bool | operator== (const DateTime &rhs) const |
Operator ==. More... | |
bool | operator> (const DateTime &rhs) const |
Operator > More... | |
std::string | toString () const |
It returns the date duration in a textual format. More... | |
virtual | ~DateDuration () |
Destructor. More... | |
Protected Attributes | |
boost::gregorian::date_duration | m_dateDuration |
Date duration information. More... | |
A class to represent date duration.
A date duration is a simple day count used for arithmetic with date, based on the Gregorian Calendar. Internally, it uses the datetime boost library to represent gregorian date duration, by using the data type boost::gregorian::date_duration.
Definition at line 51 of file DateDuration.h.
te::dt::DateDuration::DateDuration | ( | ) |
Empty constructor.
Definition at line 30 of file DateDuration.cpp.
te::dt::DateDuration::DateDuration | ( | long | dd | ) |
te::dt::DateDuration::DateDuration | ( | const boost::gregorian::date_duration & | dd | ) |
|
virtual |
Destructor.
Definition at line 81 of file DateDuration.cpp.
|
virtual |
It returns a clone of this object.
Implements te::dt::AbstractData.
Definition at line 69 of file DateDuration.cpp.
|
inline |
It returns the boost date duration type.
Definition at line 77 of file DateDuration.h.
|
inline |
It returns the boost date duration type.
Definition at line 84 of file DateDuration.h.
|
inlinevirtual |
It returns the subtype of the date and time type.
Implements te::dt::DateTime.
Definition at line 141 of file DateDuration.h.
References te::dt::DATE_DURATION.
|
inlinevirtualinherited |
It returns the data type code associated to date and time values: DATETIME_TYPE.
Implements te::dt::AbstractData.
Definition at line 103 of file DateTime.h.
References te::dt::DATETIME_TYPE.
|
virtual |
Operator !=.
rhs | The date duration to be compared. |
Implements te::dt::DateTime.
Definition at line 51 of file DateDuration.cpp.
References m_dateDuration.
|
virtual |
Operator <.
rhs | The right-hand-side date duration to be compared. |
Implements te::dt::DateTime.
Definition at line 57 of file DateDuration.cpp.
References m_dateDuration.
|
virtual |
Operator ==.
rhs | The date duration to be compared. |
Implements te::dt::DateTime.
Definition at line 45 of file DateDuration.cpp.
References m_dateDuration.
|
virtual |
Operator >
rhs | The right-hand-side date duration to be compared. |
Implements te::dt::DateTime.
Definition at line 63 of file DateDuration.cpp.
References m_dateDuration.
|
virtual |
It returns the date duration in a textual format.
Implements te::dt::AbstractData.
Definition at line 74 of file DateDuration.cpp.
References te::common::Convert2String().
|
protected |
Date duration information.
Definition at line 150 of file DateDuration.h.
Referenced by operator!=(), operator<(), operator==(), and operator>().