Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template years_duration

boost::date_time::years_duration — additional duration type that represents a logical year

Synopsis

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

template<typename base_config> 
class years_duration {
public:

  // public member functions
  ();
  ();
  BOOST_CXX14_CONSTEXPR  () ;
  BOOST_CXX14_CONSTEXPR  (const ) ;
  BOOST_CXX14_CONSTEXPR  (const ) ;
  BOOST_CXX14_CONSTEXPR  bool (const  years_type &) ;
  bool (const  years_type &) ;
  BOOST_CXX14_CONSTEXPR  years_type (const  years_type &) ;
  BOOST_CXX14_CONSTEXPR  years_type & (const  years_type &);
  BOOST_CXX14_CONSTEXPR  years_type (const  years_type &) ;
  BOOST_CXX14_CONSTEXPR  years_type & (const  years_type &);
  BOOST_CXX14_CONSTEXPR  years_type (const ) ;
  BOOST_CXX14_CONSTEXPR  years_type & (const );
  BOOST_CXX14_CONSTEXPR  years_type (const ) ;
  BOOST_CXX14_CONSTEXPR  years_type & (const );
  BOOST_CXX14_CONSTEXPR  months_type (const  months_type &) ;
  BOOST_CXX14_CONSTEXPR  months_type (const  months_type &) ;
};

Description

A logical year enables things like: "date(2002,Mar,2) + years(2) -> 2004-Mar-2". If the date is a last day-of-the-month, the result will also be a last-day-of-the-month (ie date(2001-Feb-28) + years(3) -> 2004-Feb-29).

years_duration public member functions

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

PrevUpHomeNext