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

PrevUpHomeNext

Function template next_weekday

boost::date_time::next_weekday — Generates a date object representing the date of the following weekday from the given date.

Synopsis

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


template<typename date_type, typename weekday_type> 
  date_type next_weekday(const date_type & d, const weekday_type & wd);

Description

Generates a date object representing the date of the following weekday from the given date. If the date given is 2004-May-9 (a Sunday) and the given weekday is Tuesday then the resulting date will be 2004-May-11.


PrevUpHomeNext