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

Function template days_until_weekday

boost::date_time::days_until_weekday — Calculates the number of days until the next weekday.

Synopsis

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


template<typename date_type, typename weekday_type> 
  date_type::duration_type 
  days_until_weekday(const date_type & d, const weekday_type & wd);

Description

Calculates the number of days until the next weekday. If the date given falls on a Sunday and the given weekday is Tuesday the result will be 2 days


PrevUpHomeNext