[wd_asp elements=’search’ ratio=’100%’ id=1]

Week Number date showing Mon-Sun dates

12th September 2018

Php - Dates & Time

php codehaven

The code below result is
Week 37(10/09-16/09)


$thisYear = date('Y');

$weekNum = date("W");
$datemon = date('d/m', strtotime("$thisYear-W$weekNum-1"));
$datesun = date('d/m', strtotime("$thisYear-W$weekNum-7"));
echo "Week ".$weekNum."(".$datemon."-".$datesun.")";