This is how one gets "two days ago" using boost::date
:
boost::gregorian::date today = boost::gregorian::day_clock::local_day();
boost::date_time::day_functor<boost::gregorian::date> day_offset(-2);
boost::gregorian::date modified = today + day_offset.get_offset(today);
How would one compute the date that represents "last Monday"?