Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template last_kday_of_month

boost::date_time::last_kday_of_month — Calculate something like Last Sunday of January.

Synopsis

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

template<typename date_type> 
class last_kday_of_month : public  {
public:
  // types
  typedef         ;   
  typedef  ;
  typedef        ;      
  typedef         ;       
  typedef         ;   

  // construct/copy/destruct
  (, );

  // public member functions
   () ;
   () ;
   () ;
   () ;
};

Description

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.

Template Parameters

  1. typename date_type

    A date class that exports day_of_week, month_type, etc.

last_kday_of_month public construct/copy/destruct

  1. ( dow,  m);
    Specify the date spec like last 'Sunday' in 'April' spec.

    Parameters:

    dow

    The day of week, eg: Sunday, Monday, etc

    m

    The month of the year, eg: Jan, Feb, Mar, etc

last_kday_of_month public member functions

  1.  ( year) ;
    Return a concrete date when provided with a year specific year.
  2.  () ;
  3.  () ;
  4.  () ;
    Returns string suitable for use in POSIX time zone string.

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


PrevUpHomeNext