Here\'s a summary of the issue: On Sundays, strtotime(\'this week\') returns the start of next week.
strtotime(\'this week\')
In PHP, the week seems to start on Monday. But, on
If you want the most recent monday:
function mostRecentMonday(){ if(date("w") == 1){ return strtotime("midnight today"); } else { return strtotime("last monday"); } }
Easy to modify to use DateTime, or, to even specify a different date to use as the base.