- Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- string(25) "2023-11-27T00:00:00+01:00" string(25) "2023-12-03T00:00:00+01:00"
<?php
$date = new DateTimeImmutable();
$monday = $date->modify('monday this week');
$sunday = $date->modify('sunday this week');
var_dump($monday->format(DateTime::ATOM), $sunday->format(DateTime::ATOM));