Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the develop branch, built from commit 23ef96b142.
PrevUpHomeNext

Class template first_kday_after

boost::date_time::first_kday_after — Calculate something like "First Sunday after Jan 1,2002.

Synopsis

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

template<typename date_type> 
class first_kday_after {
public:
  // types
  typedef date_type::calendar_type        calendar_type;   
  typedef calendar_type::day_of_week_type day_of_week_type;
  typedef date_type::duration_type        duration_type;   

  // public member functions
  first_kday_after(day_of_week_type);
  date_type get_date(date_type) const;
  day_of_week_type day_of_week() const;
};

Description

Date generator that takes a date and finds kday after

typedef boost::date_time::first_kday_after<date> firstkdayafter;
firstkdayafter fkaf(Monday);
fkaf.get_date(date(2002,Feb,1));

first_kday_after public member functions

  1. first_kday_after(day_of_week_type dow);
  2. date_type get_date(date_type start_day) const;
    Return next kday given.
  3. day_of_week_type day_of_week() const;

PrevUpHomeNext