function date_test_date in Date 6
Same name and namespace in other branches
- 5.2 tests/date_test.test \date_test_date()
1 call to date_test_date()
File
- tests/
date_test.test, line 129
Code
function date_test_date($y1, $m, $d = 13) {
$t = date_gmmktime(0, 0, 0, $m, $d, $y1, 0, 1);
$rez = date_gmdate('Y-n-j H:i:s', $t, 0, 1);
$y1 = date_pad($y1, 4);
if ("{$y1}-{$m}-{$d} 00:00:00" != $rez) {
return "{$y1} error, expected={$y1}-{$m}-{$d} 00:00:00, date={$rez}<";
}
return "";
}