boost::date_time::days_until_weekday — Calculates the number of days until the next weekday.
// In header: <boost/date_time/date_generators.hpp> template<typename date_type, typename weekday_type> ( d, wd);
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