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::month_functor< date_type > Class Template Reference

Provides calculation to find next nth month given a date. More...

#include <adjust_functors.hpp>

Public Types

typedef date_type::duration_type duration_type
 
typedef date_type::calendar_type cal_type
 
typedef cal_type::ymd_type ymd_type
 
typedef cal_type::day_type day_type
 

Public Member Functions

 month_functor (int f)
 
duration_type get_offset (const date_type &d) const
 
duration_type get_neg_offset (const date_type &d) const
 Returns a negative duration_type. More...
 

Detailed Description

template<class date_type>
class boost::date_time::month_functor< date_type >

Provides calculation to find next nth month given a date.

This adjustment function provides the logic for 'month-based' advancement on a ymd based calendar. The policy it uses to handle the non existant end of month days is to back up to the last day of the month. Also, if the starting date is the last day of a month, this functor will attempt to adjust to the end of the month.

Member Typedef Documentation

template<class date_type>
typedef date_type::calendar_type boost::date_time::month_functor< date_type >::cal_type
template<class date_type>
typedef cal_type::day_type boost::date_time::month_functor< date_type >::day_type
template<class date_type>
typedef date_type::duration_type boost::date_time::month_functor< date_type >::duration_type
template<class date_type>
typedef cal_type::ymd_type boost::date_time::month_functor< date_type >::ymd_type

Constructor & Destructor Documentation

template<class date_type>
boost::date_time::month_functor< date_type >::month_functor ( int  f)
inline

Member Function Documentation

template<class date_type>
duration_type boost::date_time::month_functor< date_type >::get_neg_offset ( const date_type &  d) const
inline

Returns a negative duration_type.

References boost::date_time::year.

template<class date_type>
duration_type boost::date_time::month_functor< date_type >::get_offset ( const date_type &  d) const
inline

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