Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Function template previous_weekday

boost::date_time::previous_weekday — Generates a date object representing the date of the previous weekday from the given date.

Synopsis

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


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

Description

Generates a date object representing the date of the previous 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-4.


PrevUpHomeNext