![]() |
Home | Libraries | People | FAQ | More |
boost::date_time::date_duration — Duration type with date level resolution.
// In header: <boost/date_time/date_duration.hpp> template<typename duration_rep_traits> class date_duration : private { public: // types typedef ; typedef ; // construct/copy/destruct (); (); // public member functions () ; () ; () ; () ; (date_duration &) ; (date_duration &) ; date_duration & (date_duration &); date_duration & (date_duration &); date_duration () ; date_duration & (); () ; // public static functions date_duration (); };
date_duration
public
construct/copy/destruct( day_count);Construct from a day count.
( sv);
construct from special_values - only works when instantiated with duration_traits_adapted
date_duration
public member functions() ;returns days_ as it's instantiated type - used for streaming
() ;
() ;
() ;returns days as value, not object.
(date_duration & rhs) ;Equality.
(date_duration & rhs) ;Less.
date_duration & (date_duration & rhs);Subtract another duration – result is signed.
date_duration & (date_duration & rhs);Add a duration – result is signed.
date_duration () ;unary- Allows for dd = -date_duration(2); -> dd == -2
date_duration & ( divisor);Division operations on a duration with an integer.
() ;return sign information
date_duration
public static functionsdate_duration ();Returns the smallest duration – used by to calculate 'end'.