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::months_duration< base_config > Class Template Reference

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

#include <date_duration_types.hpp>

Public Member Functions

 months_duration (int_rep num)
 
 months_duration (special_values sv)
 
int_rep number_of_months () 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 months_type &rhs) const
 
bool operator!= (const months_type &rhs) const
 
months_type operator+ (const months_type &rhs) const
 
months_typeoperator+= (const months_type &rhs)
 
months_type operator- (const months_type &rhs) const
 
months_typeoperator-= (const months_type &rhs)
 
months_type operator* (const int_type rhs) const
 
months_typeoperator*= (const int_type rhs)
 
months_type operator/ (const int_type rhs) const
 
months_typeoperator/= (const int_type rhs)
 
months_type operator+ (const years_type &y) const
 
months_typeoperator+= (const years_type &y)
 
months_type operator- (const years_type &y) const
 
months_typeoperator-= (const years_type &y)
 

Friends

date_type operator+ (const date_type &d, const months_type &m)
 
date_type operator+= (date_type &d, const months_type &m)
 
date_type operator- (const date_type &d, const months_type &m)
 
date_type operator-= (date_type &d, const months_type &m)
 

Detailed Description

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

additional duration type that represents a logical month

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.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Friends And Related Function Documentation

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

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