]> granicus.if.org Git - php/commitdiff
Fixed tests
authorDmitry Stogov <dmitry@php.net>
Wed, 7 Dec 2005 14:39:07 +0000 (14:39 +0000)
committerDmitry Stogov <dmitry@php.net>
Wed, 7 Dec 2005 14:39:07 +0000 (14:39 +0000)
ext/date/tests/bug35414.phpt
ext/date/tests/bug35422.phpt
ext/date/tests/bug35456.phpt
ext/date/tests/bug35499.phpt
ext/date/tests/date_create-3.phpt

index 5e530fb98ce939aba4c32a27cb2b4002a26ff0ec..77dd6cb76208f1e1b3d74056bec1669e876dd608 100644 (file)
@@ -4,9 +4,9 @@ Bug #35414 (strtotime() no longer works with ordinal suffix)
 <?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
index 8273c75411763505b392fe8c11ca5fd61ffaa3f9..c99d53f5a8e5b802b80d2dd1fd0fc7dcdae63f16 100644 (file)
@@ -4,8 +4,8 @@ Bug #35422 (strtotime() does not parse times with UTC as timezone)
 <?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
index 6432b9944530ec3b6ecf24f256adf48cd0f1f3e4..907e6df4123709b48818ed271bccb8da4d94ac81 100644 (file)
@@ -6,9 +6,9 @@ date_default_timezone_set("UTC");
 
 $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
index 2fbcbf0bfaa7d9c9f223cc2157ab479a56f73ce9..c3cdf77b27959bd3a3ef48631aea8266c6037dfe 100644 (file)
@@ -4,8 +4,8 @@ Bug #35499 (strtotime() does not handle whitespace around the date string)
 <?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 "));
 ?>
index 350a4c21d6651ec5753a97abb5dcc037c59ef02a..0874f03cf933ff3f2be2b4e10f9b396d9a30ca45 100644 (file)
@@ -5,8 +5,8 @@ date_create() function [3]
 --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