$week_number = date("W", strtotime('now'));// ISO-8601 week number
$year_number = date("o", strtotime('now'));// ISO-8601 year number
// as per ISO-8601 specification, December 28th is always in the last week of its year. The highest week number in a year is either 52 or 53.
// and January 4th always be in the first week of the year
// and week 01 is the week with the first Thursday in it
// Week number according to the ISO-8601 standard, weeks starting on Monday. The first week of the year is the week
// N ISO-8601 numeric representation of the day of the week (added in PHP 5.1.0) 1 (for Monday) through 7 (for Sunday)
// w Numeric representation of the day of the week 0 (for Sunday) through 6 (for Saturday)
// PHP week start from 0 = sunday to 6 saturday
// $sunday_last_week = date("Y-m-d", strtotime('sunday last week'));
// $sunday_this_week = date("Y-m-d", strtotime('sunday this week'));
// echo "sunday last week: $sunday_last_week - sunday this week: $sunday_this_week";
if($week_number<=9)
{
$week_number= "0".$week_number;
}
$last_monday = date('Y-m-d', strtotime("$this_year-W$week_number"));
// print date of first day of week (MONDAY), week_number must be two digit and year must be 4 digit ISO 8601
$tuesday= date('Y-m-d',strtotime("$last_monday +1 days"));
$wednesday= date('Y-m-d',strtotime("$last_monday +2 days"));
$thursday= date('Y-m-d',strtotime("$last_monday +3 days"));
$friday= date('Y-m-d',strtotime("$last_monday +4 days"));
$saturday= date('Y-m-d',strtotime("$last_monday +5 days"));
$next_sunday= date('Y-m-d',strtotime("$last_monday +6 days"));
?>