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

Click here to view the latest version of this page.
PrevUpHomeNext

Class template first_kday_before

boost::date_time::first_kday_before — Calculate something like "First Sunday before Jan 1,2002.

Synopsis

template<typename date_type> 
class first_kday_before {
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;

// construct/copy/destruct
first_kday_before(day_of_week_type);

// public member functions
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_before<date> firstkdaybefore;
     firstkdaybefore fkbf(Monday);
     fkbf.get_date(date(2002,Feb,1));

first_kday_before construct/copy/destruct

  1. first_kday_before(day_of_week_type dow);

first_kday_before public member functions

  1. date_type get_date(date_type start_day) const;
  2. day_of_week_type day_of_week() const;
Copyright 2001-2005 CrystalClear Software, Inc

PrevUpHomeNext