You are here

function date_test_date in Date 5.2

Same name and namespace in other branches
  1. 6 tests/date_test.test \date_test_date()
1 call to date_test_date()
DatePHP4LibTest::testPHP4DateLibrary in tests/date_test.test

File

tests/date_test.test, line 131

Code

function date_test_date($y1, $m, $d = 13) {
  $t = date_gmmktime(0, 0, 0, $m, $d, $y1);
  $rez = date_gmdate('Y-n-j H:i:s', $t);
  $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 "";
}