<?php
print_r(verifyDate('1.1.2011'));
echo ':::';
print_r(getMonth(null));
echo ':::';
print_r(getQuarter(null));
echo ':::';
print_r(dtf(' '));
function getMonth($d)
{
return dtf($d,'n');
}
function getQuarter($d)
{
return ceil( getMonth($d) / 3);
}
function verifyDate($date)
{
return DateTime::createFromFormat('m/d/Y', $date);
}
function dtf($date, $format = 'd.m.Y'){
if($date){
$date = new DateTime($date);
return $date->format($format);
}
}
- Output for 5.6.28, 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
- ::::::0:::30.11.2015
- Output for 7.0.6
- ::::::0:::03.05.2016
- Output for 7.0.5
- ::::::0:::03.04.2016
- Output for 7.0.4
- ::::::0:::10.03.2016
- Output for 7.0.3
- ::::::0:::18.03.2016
- Output for 7.0.2
- ::::::0:::23.03.2016
- Output for 7.0.1
- ::::::0:::24.03.2016
- Output for 7.0.0
- ::::::0:::27.03.2016
- Output for 5.6.21
- ::::::0:::02.05.2016
- Output for 5.6.20
- ::::::0:::10.04.2016
- Output for 5.6.19
- ::::::0:::08.03.2016
- Output for 5.6.18
- ::::::0:::15.03.2016
- Output for 5.6.17
- ::::::0:::20.03.2016
- Output for 5.6.16
- ::::::0:::28.03.2016
- Output for 5.6.15
- ::::::0:::29.03.2016
- Output for 5.6.14
- ::::::0:::02.04.2016
- Output for 5.6.13
- ::::::0:::15.04.2016
- Output for 5.6.12
- ::::::0:::20.04.2016
- Output for 5.6.11
- ::::::0:::24.04.2016
- Output for 5.6.10
- ::::::0:::25.04.2016
- Output for 5.6.9
- ::::::0:::27.04.2016
- Output for 5.6.8
- ::::::0:::30.04.2016
- Output for 5.5.35
- ::::::0:::22.05.2016
- Output for 5.5.34
- ::::::0:::11.04.2016
- Output for 5.5.33
- ::::::0:::09.03.2016
- Output for 5.5.32
- ::::::0:::17.03.2016
- Output for 5.5.31
- ::::::0:::21.03.2016
- Output for 5.5.30
- ::::::0:::01.04.2016
- Output for 5.5.29
- ::::::0:::17.04.2016
- Output for 5.5.28
- ::::::0:::21.04.2016
- Output for 5.5.27
- ::::::0:::22.04.2016
- Output for 5.5.26
- ::::::0:::26.04.2016
- Output for 5.5.25
- ::::::0:::29.04.2016
- Output for 5.5.24
- ::::::0:::24.05.2016
preferences:
167.83 ms | 401 KiB | 209 Q