Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::date_time::years_duration< base_config > Class Template Reference

additional duration type that represents a logical year More...

#include <date_duration_types.hpp>

Public Member Functions

 years_duration (int_rep num)
 
 years_duration (special_values sv)
 
int_rep number_of_years () const
 
duration_type get_neg_offset (const date_type &d) const
 returns a negative duration More...
 
duration_type get_offset (const date_type &d) const
 
bool operator== (const years_type &rhs) const
 
bool operator!= (const years_type &rhs) const
 
years_type operator+ (const years_type &rhs) const
 
years_typeoperator+= (const years_type &rhs)
 
years_type operator- (const years_type &rhs) const
 
years_typeoperator-= (const years_type &rhs)
 
years_type operator* (const int_type rhs) const
 
years_typeoperator*= (const int_type rhs)
 
years_type operator/ (const int_type rhs) const
 
years_typeoperator/= (const int_type rhs)
 
months_type operator+ (const months_type &m) const
 
months_type operator- (const months_type &m) const
 

Friends

date_type operator+ (const date_type &d, const years_type &y)
 
date_type operator+= (date_type &d, const years_type &y)
 
date_type operator- (const date_type &d, const years_type &y)
 
date_type operator-= (date_type &d, const years_type &y)
 

Detailed Description

template<class base_config>
class boost::date_time::years_duration< base_config >

additional duration type that represents a logical year

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).

Constructor & Destructor Documentation

template<class base_config >
boost::date_time::years_duration< base_config >::years_duration ( int_rep  num)
inline
template<class base_config >
boost::date_time::years_duration< base_config >::years_duration ( special_values  sv)
inline

Member Function Documentation

template<class base_config >
duration_type boost::date_time::years_duration< base_config >::get_neg_offset ( const date_type &  d) const
inline
template<class base_config >
duration_type boost::date_time::years_duration< base_config >::get_offset ( const date_type &  d) const
inline
template<class base_config >
bool boost::date_time::years_duration< base_config >::operator!= ( const years_type rhs) const
inline
template<class base_config >
years_type boost::date_time::years_duration< base_config >::operator* ( const int_type  rhs) const
inline
template<class base_config >
years_type& boost::date_time::years_duration< base_config >::operator*= ( const int_type  rhs)
inline
template<class base_config >
years_type boost::date_time::years_duration< base_config >::operator+ ( const years_type rhs) const
inline
template<class base_config >
months_type boost::date_time::years_duration< base_config >::operator+ ( const months_type m) const
inline
template<class base_config >
years_type& boost::date_time::years_duration< base_config >::operator+= ( const years_type rhs)
inline
template<class base_config >
years_type boost::date_time::years_duration< base_config >::operator- ( const years_type rhs) const
inline
template<class base_config >
months_type boost::date_time::years_duration< base_config >::operator- ( const months_type m) const
inline
template<class base_config >
years_type& boost::date_time::years_duration< base_config >::operator-= ( const years_type rhs)
inline
template<class base_config >
years_type boost::date_time::years_duration< base_config >::operator/ ( const int_type  rhs) const
inline
template<class base_config >
years_type& boost::date_time::years_duration< base_config >::operator/= ( const int_type  rhs)
inline
template<class base_config >
bool boost::date_time::years_duration< base_config >::operator== ( const years_type rhs) const
inline

Friends And Related Function Documentation

template<class base_config >
date_type operator+ ( const date_type &  d,
const years_type y 
)
friend
template<class base_config >
date_type operator+= ( date_type &  d,
const years_type y 
)
friend
template<class base_config >
date_type operator- ( const date_type &  d,
const years_type y 
)
friend
template<class base_config >
date_type operator-= ( date_type &  d,
const years_type y 
)
friend

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