You are here

function date_test_date in Date 6

Same name and namespace in other branches
  1. 5.2 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 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 "";
}