Running
var_dump(new \DateTime('first day of this week'));
Returns the 1st of September
Is this a bug, and is there any workaround?
Running
var_dump(new \DateTime('first day of this week'));
Returns the 1st of September
Is this a bug, and is there any workaround?
Refer to this - Finding First day of week via php Also try this -
<?php
// var_dump(new \DateTime('first day of this week'));
echo date("Y-m-d", strtotime('monday this week')), "<br/>\n";
echo date("Y-m-d", strtotime('sunday last week')), "<br/>\n";
?>