0

Attempting to get the first Monday of the first Week of the month. May 1st is a Sunday therefore the previous Monday is expected to be the first Monday.

$date = '2016-05-01';

$dateTimeObject = new DateTime($date, new DateTimeZone('Europe/London'));
$dateTimeObject->modify('first monday of this week');
echo $dateTimeObject->format('d');

However this echos 02 which is the following week's Monday when it should be April 25?

succeed
  • 834
  • 1
  • 11
  • 28

0 Answers0