You can easily create a timestamp using the strtotime function - it takes both a phrase like “last Monday” and a secondary parameter, which is a timestamp that you can easily make from the date you use mktime (note that inputs for a specific date Hour,Minute,Second,Month,Day,Year ).
<?php $monday=strtotime("monday this week", mktime(0,0,0, 8, 8, 2012)); echo date("Ymd",$monday);
Change "last monday" in strtotime to "monday this week" and now it works fine.
source share