Duration type with date level resolution. More...
#include <date_duration.hpp>
Public Types | |
typedef duration_rep_traits::int_type | duration_rep_type |
typedef duration_rep_traits::impl_type | duration_rep |
Public Member Functions | |
date_duration (duration_rep day_count) | |
Construct from a day count. More... | |
date_duration (special_values sv) | |
construct from special_values - only works when instantiated with duration_traits_adapted More... | |
date_duration (const date_duration< duration_rep_traits > &other) | |
Construct from another date_duration (Copy Constructor) 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_duration & | operator-= (const date_duration &rhs) |
Subtract another duration – result is signed. More... | |
date_duration & | operator+= (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_duration & | operator/= (int divisor) |
Division operations on a duration with an integer. 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... | |
Duration type with date level resolution.
typedef duration_rep_traits::impl_type boost::date_time::date_duration< duration_rep_traits >::duration_rep |
typedef duration_rep_traits::int_type boost::date_time::date_duration< duration_rep_traits >::duration_rep_type |
|
inlineexplicit |
Construct from a day count.
|
inline |
construct from special_values - only works when instantiated with duration_traits_adapted
|
inline |
Construct from another date_duration (Copy Constructor)
|
inline |
returns days as value, not object.
Referenced by boost::expressions::aux::date_time_support::decompose_date_duration(), boost::date_time::date< date, gregorian_calendar, date_duration >::operator+(), and boost::date_time::date< date, gregorian_calendar, date_duration >::operator-().
|
inline |
returns days_ as it's instantiated type - used for streaming
Referenced by boost::date_time::date< date, gregorian_calendar, date_duration >::operator+(), boost::date_time::date_duration< date_duration_rep >::operator-(), boost::date_time::date< date, gregorian_calendar, date_duration >::operator-(), and boost::serialization::save().
|
inline |
return sign information
|
inline |
|
inline |
Add a duration – result is signed.
|
inline |
unary- Allows for dd = -date_duration(2); -> dd == -2
|
inline |
Subtract another duration – result is signed.
|
inline |
Division operations on a duration with an integer.
|
inline |
Less.
|
inline |
Equality.
|
inlinestatic |
Returns the smallest duration – used by to calculate 'end'.