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

Calculate something like Last Sunday of January. More...

#include <date_generators.hpp>

Inheritance diagram for boost::date_time::last_kday_of_month< date_type >:
Collaboration diagram for boost::date_time::last_kday_of_month< date_type >:

Public Types

typedef date_type::calendar_type calendar_type
 
typedef
calendar_type::day_of_week_type 
day_of_week_type
 
typedef calendar_type::month_type month_type
 
typedef calendar_type::year_type year_type
 
typedef date_type::duration_type duration_type
 

Public Member Functions

 last_kday_of_month (day_of_week_type dow, month_type m)
 Specify the date spec like last 'Sunday' in 'April' spec. More...
 
date_type get_date (year_type year) const
 Return a concrete date when provided with a year specific year. More...
 
month_type month () const
 
day_of_week_type day_of_week () const
 
virtual std::string to_string () const
 Returns string suitable for use in POSIX time zone string. More...
 

Detailed Description

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

Calculate something like Last Sunday of January.

Useful generator functor for finding holidays and daylight savings Get the last day of the month and then calculate the difference to the last previous day.

Parameters
date_typeA date class that exports day_of_week, month_type, etc.

Member Typedef Documentation

template<class date_type >
typedef date_type::calendar_type boost::date_time::last_kday_of_month< date_type >::calendar_type
template<class date_type >
typedef calendar_type::day_of_week_type boost::date_time::last_kday_of_month< date_type >::day_of_week_type
template<class date_type >
typedef date_type::duration_type boost::date_time::last_kday_of_month< date_type >::duration_type
template<class date_type >
typedef calendar_type::month_type boost::date_time::last_kday_of_month< date_type >::month_type
template<class date_type >
typedef calendar_type::year_type boost::date_time::last_kday_of_month< date_type >::year_type

Constructor & Destructor Documentation

template<class date_type >
boost::date_time::last_kday_of_month< date_type >::last_kday_of_month ( day_of_week_type  dow,
month_type  m 
)
inline

Specify the date spec like last 'Sunday' in 'April' spec.

Parameters
dowThe day of week, eg: Sunday, Monday, etc
mThe month of the year, eg: Jan, Feb, Mar, etc

Member Function Documentation

template<class date_type >
virtual std::string boost::date_time::last_kday_of_month< date_type >::to_string ( ) const
inlinevirtual

Returns string suitable for use in POSIX time zone string.

Returns a string formatted as "M4.5.0" ==> last Sunday in April.

Implements boost::date_time::year_based_generator< date_type >.


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