- ceil: documentation ( source)
<?php
$date = new \DateTime('-4 month', new \DateTimeZone('GMT'));
//echo $date->format('m-d-Y');
$quarter = ceil($date->format('n') / 3);
$year = $date->format('Y');
$date = \DateTime::createFromFormat('Y-n-j H:i', strval($year+1)."-$month-1 00:00");
echo $date->format('d-m-Y H:i');