Here is my way
To find it, you can do it like this:
Step 1:
Find the beginning and last day of the week
$FirstDay = date("Ymd", strtotime('sunday last week')); $LastDay = date("Ymd", strtotime('sunday this week'));
Step 2:
See if a set date exists between the beginning and the last day of the week.
if($Date > $FirstDay && $Date < $LastDay) { echo "It is Between"; } else { echo "No Not !!!"; }
If Yes , then it belongs to Else Not
So finally, the code you have,
<?php $Date = "2015-06-01";
Note
source share