<?php
print_r(getMonth(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);
}
- Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
- Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /in/V3u2q on line 16
11
- Output for 5.6.28, 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30
- 11
- Output for 5.5.24, 5.5.35, 5.6.21, 7.0.6
- 5
- Output for 5.5.25 - 5.5.30, 5.5.34, 5.6.8 - 5.6.14, 5.6.20, 7.0.5
- 4
- Output for 5.5.31 - 5.5.33, 5.6.15 - 5.6.19, 7.0.0 - 7.0.4
- 3
preferences:
128.21 ms | 402 KiB | 200 Q