Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template months_duration

boost::date_time::months_duration — additional duration type that represents a logical month

Synopsis

// In header: <boost/date_time/date_duration_types.hpp>

template<typename base_config> 
class months_duration {
public:
  // construct/copy/destruct
  ();
  ();

  // public member functions
   () ;
   () ;
   () ;
   (months_type &) ;
   (months_type &) ;
  months_type (months_type &) ;
  months_type & (months_type &);
  months_type (months_type &) ;
  months_type & (months_type &);
  months_type () ;
  months_type & ();
  months_type () ;
  months_type & ();
  months_type (years_type &) ;
  months_type & (years_type &);
  months_type (years_type &) ;
  months_type & (years_type &);
};

Description

A logical month enables things like: "date(2002,Mar,2) + months(2) -> 2002-May2". If the date is a last day-of-the-month, the result will also be a last-day-of-the-month.

months_duration public construct/copy/destruct

  1. ( num);
  2. ( sv);

months_duration public member functions

  1.  () ;
  2.  ( d) ;
    returns a negative duration
  3.  ( d) ;
  4.  (months_type & rhs) ;
  5.  (months_type & rhs) ;
  6. months_type (months_type & rhs) ;
  7. months_type & (months_type & rhs);
  8. months_type (months_type & rhs) ;
  9. months_type & (months_type & rhs);
  10. months_type ( rhs) ;
  11. months_type & ( rhs);
  12. months_type ( rhs) ;
  13. months_type & ( rhs);
  14. months_type (years_type & y) ;
  15. months_type & (years_type & y);
  16. months_type (years_type & y) ;
  17. months_type & (years_type & y);

PrevUpHomeNext