Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::gregorian::date_duration Class Reference

Durations in days for gregorian system. More...

#include <greg_duration.hpp>

Inheritance diagram for boost::gregorian::date_duration:
Collaboration diagram for boost::gregorian::date_duration:

Public Types

typedef base_type::duration_rep duration_rep
 
typedef date_duration_rep::int_type duration_rep_type
 

Public Member Functions

 date_duration (duration_rep day_count=0)
 Construct from a day count. More...
 
 date_duration (date_time::special_values sv)
 construct from special_values More...
 
 date_duration (const date_duration &other)
 Copy constructor. More...
 
 date_duration (const base_type &other)
 Construct from another date_duration. More...
 
bool operator== (const date_duration &rhs) const
 
bool operator!= (const date_duration &rhs) const
 
bool operator< (const date_duration &rhs) const
 
bool operator> (const date_duration &rhs) const
 
bool operator<= (const date_duration &rhs) const
 
bool operator>= (const date_duration &rhs) const
 
date_durationoperator-= (const date_duration &rhs)
 Subtract another duration – result is signed. More...
 
date_durationoperator+= (const date_duration &rhs)
 Add a duration – result is signed. More...
 
date_duration operator- () const
 unary- Allows for dd = -date_duration(2); -> dd == -2 More...
 
date_durationoperator/= (int divisor)
 Division operations on a duration with an integer. More...
 
duration_rep get_rep () const
 returns days_ as it's instantiated type - used for streaming More...
 
bool is_special () const
 
duration_rep_type days () const
 returns days as value, not object. More...
 
bool operator== (const date_duration &rhs) const
 Equality. More...
 
bool operator< (const date_duration &rhs) const
 Less. More...
 
date_durationoperator-= (const date_duration &rhs)
 Subtract another duration – result is signed. More...
 
date_durationoperator+= (const date_duration &rhs)
 Add a duration – result is signed. More...
 
bool is_negative () const
 return sign information More...
 

Static Public Member Functions

static date_duration unit ()
 Returns the smallest duration – used by to calculate 'end'. More...
 

Friends

date_duration operator- (date_duration rhs, date_duration const &lhs)
 
date_duration operator+ (date_duration rhs, date_duration const &lhs)
 
date_duration operator/ (date_duration rhs, int lhs)
 

Detailed Description

Durations in days for gregorian system.

Member Typedef Documentation

Constructor & Destructor Documentation

boost::gregorian::date_duration::date_duration ( duration_rep  day_count = 0)
inlineexplicit

Construct from a day count.

Referenced by operator-(), and unit().

boost::gregorian::date_duration::date_duration ( date_time::special_values  sv)
inline

construct from special_values

boost::gregorian::date_duration::date_duration ( const date_duration other)
inline

Copy constructor.

boost::gregorian::date_duration::date_duration ( const base_type other)
inline

Construct from another date_duration.

Member Function Documentation

returns days as value, not object.

duration_rep boost::date_time::date_duration< date_duration_rep >::get_rep ( ) const
inlineinherited

returns days_ as it's instantiated type - used for streaming

Referenced by operator-(), and unit().

bool boost::date_time::date_duration< date_duration_rep >::is_negative ( ) const
inlineinherited

return sign information

bool boost::date_time::date_duration< date_duration_rep >::is_special ( ) const
inlineinherited
bool boost::gregorian::date_duration::operator!= ( const date_duration rhs) const
inline

References operator==().

date_duration& boost::gregorian::date_duration::operator+= ( const date_duration rhs)
inline

Add a duration – result is signed.

References boost::date_time::date_duration< date_duration_rep >::operator+=().

date_duration& boost::date_time::date_duration< date_duration_rep >::operator+= ( const date_duration< date_duration_rep > &  rhs)
inlineinherited

Add a duration – result is signed.

Referenced by operator+=().

date_duration boost::gregorian::date_duration::operator- ( ) const
inline

unary- Allows for dd = -date_duration(2); -> dd == -2

References date_duration(), and boost::date_time::date_duration< date_duration_rep >::get_rep().

date_duration& boost::gregorian::date_duration::operator-= ( const date_duration rhs)
inline

Subtract another duration – result is signed.

References boost::date_time::date_duration< date_duration_rep >::operator-=().

date_duration& boost::date_time::date_duration< date_duration_rep >::operator-= ( const date_duration< date_duration_rep > &  rhs)
inlineinherited

Subtract another duration – result is signed.

Referenced by operator-=().

date_duration& boost::gregorian::date_duration::operator/= ( int  divisor)
inline

Division operations on a duration with an integer.

References boost::date_time::date_duration< date_duration_rep >::operator/=().

bool boost::gregorian::date_duration::operator< ( const date_duration rhs) const
inline
bool boost::date_time::date_duration< date_duration_rep >::operator< ( const date_duration< date_duration_rep > &  rhs) const
inlineinherited

Less.

Referenced by operator<(), operator>(), and operator>=().

bool boost::gregorian::date_duration::operator<= ( const date_duration rhs) const
inline
bool boost::gregorian::date_duration::operator== ( const date_duration rhs) const
inline
bool boost::date_time::date_duration< date_duration_rep >::operator== ( const date_duration< date_duration_rep > &  rhs) const
inlineinherited

Equality.

Referenced by operator==(), and operator>().

bool boost::gregorian::date_duration::operator> ( const date_duration rhs) const
inline
bool boost::gregorian::date_duration::operator>= ( const date_duration rhs) const
inline
static date_duration boost::gregorian::date_duration::unit ( )
inlinestatic

Friends And Related Function Documentation

date_duration operator+ ( date_duration  rhs,
date_duration const &  lhs 
)
friend
date_duration operator- ( date_duration  rhs,
date_duration const &  lhs 
)
friend
date_duration operator/ ( date_duration  rhs,
int  lhs 
)
friend

The documentation for this class was generated from the following file: