<?php
date_default_timezone_set("UTC");
-echo date(DATE_ISO8601, strtotime("Sat 26th Nov 2005 18:18")) . "\n";
-echo date(DATE_ISO8601, strtotime("Dec. 4th, 2005")) . "\n";
-echo date(DATE_ISO8601, strtotime("December 4th, 2005")) . "\n";
+echo date(date::ISO8601, strtotime("Sat 26th Nov 2005 18:18")) . "\n";
+echo date(date::ISO8601, strtotime("Dec. 4th, 2005")) . "\n";
+echo date(date::ISO8601, strtotime("December 4th, 2005")) . "\n";
?>
--EXPECT--
2004-12-26T18:18:00+0000
<?php
date_default_timezone_set("UTC");
-echo date(DATE_ISO8601, strtotime("July 1, 2000 00:00:00 UTC")) . "\n";
-echo date(DATE_ISO8601, strtotime("July 1, 2000 00:00:00 GMT")) . "\n";
+echo date(date::ISO8601, strtotime("July 1, 2000 00:00:00 UTC")) . "\n";
+echo date(date::ISO8601, strtotime("July 1, 2000 00:00:00 GMT")) . "\n";
?>
--EXPECT--
2000-07-01T00:00:00+0000
$t = 1133216119;
-echo date(DATE_ISO8601, strtotime("+ 1 day", $t)) . "\n";
-echo date(DATE_ISO8601, strtotime("+ 1 month", $t)) . "\n";
-echo date(DATE_ISO8601, strtotime("+ 1 week", $t)) . "\n";
+echo date(date::ISO8601, strtotime("+ 1 day", $t)) . "\n";
+echo date(date::ISO8601, strtotime("+ 1 month", $t)) . "\n";
+echo date(date::ISO8601, strtotime("+ 1 week", $t)) . "\n";
?>
--EXPECT--
2005-11-29T22:15:19+0000
<?php
date_default_timezone_set("UTC");
-echo date(DATE_ISO8601, strtotime("11/20/2005 8:00 AM \r\n")) . "\n";
-echo date(DATE_ISO8601, strtotime(" 11/20/2005 8:00 AM \r\n")) . "\n";
+echo date(date::ISO8601, strtotime("11/20/2005 8:00 AM \r\n")) . "\n";
+echo date(date::ISO8601, strtotime(" 11/20/2005 8:00 AM \r\n")) . "\n";
var_dump(strtotime(" a "));
var_dump(strtotime(" \n "));
?>
--FILE--
<?php
date_default_timezone_set("GMT");
-echo date_format(date_create("Dec31 2005 +0100"), DATE_ISO8601), "\n";
-echo date(DATE_ISO8601, strtotime("Dec31 2005 +0100")), "\n";
+echo date_format(date_create("Dec31 2005 +0100"), date::ISO8601), "\n";
+echo date(date::ISO8601, strtotime("Dec31 2005 +0100")), "\n";
?>
--EXPECT--
2005-12-31T00:00:00+0100