Answers for "php datetime this week"

PHP
2

php check weekday of date

$dayofweek = date('w', strtotime($date));
$result    = date('Y-m-d', strtotime(($day - $dayofweek).' day', strtotime($date)));
Posted by: Guest on April-29-2020
0

how to get week start date in php

$firstday = date('l - d/m/Y', strtotime("this week"));
echo "First day of this week: ", $firstday;
Posted by: Guest on October-21-2021
0

php get this week date range

$monday = strtotime('last monday', strtotime('tomorrow'));
$sunday = strtotime('+6 days', $monday);
echo "<P>". date('d-M-Y', $monday) . " to " . date('d-M-Y', $sunday) . "</P>";
Posted by: Guest on January-21-2022

Browse Popular Code Answers by Language