In PHP many useful date functions are present. One I found very useful for a project was finding the Date range of the current week. With the below code, you can find the start and end date of the current week.
This Sunday will be the start of the week and this Saturday will be the end of the week.
$currentweekstart = date("M jS Y",strtotime('sunday last week')); $currentweekend = date("M jS Y",strtotime("saturday this week"));
Here in the variable
$currentweekstart , we can get the week start date and in
$currentweekend we will get the end of the week.
So the week range will be :
$currentweekdate = $currentweekstart.' - '.$currentweekend;
Hope this helps!