<?php $currentDate = new DateTimeImmutable(); $firstOfTheMonth = new DateTimeImmutable($currentDate->format('Y-m-1')); $oneMonthInterval = new DateInterval('P1M'); var_dump($firstOfTheMonth->sub($oneMonthInterval));
You have javascript disabled. You will not be able to edit any code.