src/Generic/common/TimexUtils.cpp
// ISO weeks always run Monday->Sunday

ISO weeks always run Monday->Sunday
ISO weeks always run Monday - > Sunday
boost::gregorian::date_period TimexUtils::ISOContainingWeekFromDate(
		boost::gregorian::date d) 
{
	using namespace boost::gregorian;
	date beginning, end;
	if (d.day_of_week() == Monday) {
		beginning = d;
	} else {
		first_day_of_the_week_before first_Monday_before(Monday);
		beginning = first_Monday_before.get_date(d);
	}
	if (d.day_of_week() == Sunday) {
		end = d;
	} else {
		first_day_of_the_week_after first_Sunday_after(Sunday);
		end = first_Sunday_after.get_date(d);
	}
	return date_period(beginning, end);
}
boost :: gregorian :: date_period TimexUtils :: ISOContainingWeekFromDate ( boost :: gregorian :: date d ) { using namespace boost :: gregorian ; date beginning , end ; if ( d . day_of_week ( ) == Monday ) { beginning = d ; } else { first_day_of_the_week_before first_Monday_before ( Monday ) ; beginning = first_Monday_before . get_date ( d ) ; } if ( d . day_of_week ( ) == Sunday ) { end = d ; } else { first_day_of_the_week_after first_Sunday_after ( Sunday ) ; end = first_Sunday_after . get_date ( d ) ; } return date_period ( beginning , end ) ; }
ISO weeks always run Monday->Sunday
ISO weeks always run Monday - > Sunday