A class to represent date duration.
More...
#include <DateDuration.h>
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.
- See also
- DateTime, Date, DatePeriod, TimeDuration, TimeInstant, TimeInstantTZ, TimePeriod, TimePeriodTZ
Definition at line 51 of file DateDuration.h.
te::dt::DateDuration::DateDuration |
( |
| ) |
|
te::dt::DateDuration::DateDuration |
( |
long |
dd | ) |
|
Constructor.
- Parameters
-
dd | A date duration in days. |
te::dt::DateDuration::DateDuration |
( |
const boost::gregorian::date_duration & |
dd | ) |
|
virtual te::dt::DateDuration::~DateDuration |
( |
| ) |
|
|
virtual |
const boost::gregorian::date_duration& te::dt::DateDuration::getDateDuration |
( |
| ) |
const |
|
inline |
It returns the boost date duration type.
- Returns
- The boost date duration type.
Definition at line 77 of file DateDuration.h.
boost::gregorian::date_duration& te::dt::DateDuration::getDateDuration |
( |
| ) |
|
|
inline |
It returns the boost date duration type.
- Returns
- The boost date duration type.
Definition at line 84 of file DateDuration.h.
DateTimeType te::dt::DateDuration::getDateTimeType |
( |
| ) |
const |
|
inlinevirtual |
int te::dt::DateTime::getTypeCode |
( |
| ) |
const |
|
inlinevirtualinherited |
It returns the data type code associated to date and time values: DATETIME_TYPE.
- Returns
- The data type code associated to the date and time values: DATETIME_TYPE.
Implements te::dt::AbstractData.
Definition at line 103 of file DateTime.h.
References te::dt::DATETIME_TYPE.
bool te::dt::DateDuration::operator!= |
( |
const DateTime & |
rhs | ) |
const |
|
virtual |
Operator !=.
- Parameters
-
rhs | The date duration to be compared. |
- Returns
- It returns true if the two date durations are not equal. Otherwise, it returns false.
Implements te::dt::DateTime.
bool te::dt::DateDuration::operator< |
( |
const DateTime & |
rhs | ) |
const |
|
virtual |
Operator <.
- Parameters
-
rhs | The right-hand-side date duration to be compared. |
- Returns
- It returns true if the right-hand-side date duration is greater than the lefth side one. Otherwise, it returns false.
Implements te::dt::DateTime.
bool te::dt::DateDuration::operator== |
( |
const DateTime & |
rhs | ) |
const |
|
virtual |
Operator ==.
- Parameters
-
rhs | The date duration to be compared. |
- Returns
- It returns true if the two date durations are equal. Otherwise, it returns false.
Implements te::dt::DateTime.
bool te::dt::DateDuration::operator> |
( |
const DateTime & |
rhs | ) |
const |
|
virtual |
Operator >
- Parameters
-
rhs | The right-hand-side date duration to be compared. |
- Returns
- It returns true if the right-hand-side date duration is less than the lefth side one. Otherwise, it returns false.
Implements te::dt::DateTime.
std::string te::dt::DateDuration::toString |
( |
| ) |
const |
|
virtual |
It returns the date duration in a textual format.
- Returns
- The date duration in a textual format.
Implements te::dt::AbstractData.
boost::gregorian::date_duration te::dt::DateDuration::m_dateDuration |
|
protected |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/terralib5/src/terralib/datatype/DateDuration.h