- Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
- Parse error: syntax error, unexpected ')' in /in/ZMNUJ on line 4
Process exited with code 255.
<?php
print_r(getMonth(null));
echo();
print_r(getQuarter(null));
function getMonth($d)
{
return dtf($d,'n');
}
function getQuarter($d)
{
return ceil( getMonth($d) / 3);
}
function dtf($date, $format = 'd.m.Y'){
$date = new DateTime($date);
return $date->format($format);
}