I was using a binary with the new timelib. Undo the datetime tests
[hiphop-php.git] / hphp / test / zend / bad / ext-date / DateTime_modify_basic1.php
blob134ef4cad2eca1e18a88af2f4461e91337b7c3a2
1 <?php
2 /* Prototype : public DateTime DateTime::modify ( string $modify )
3 * Description: Alter the timestamp of a DateTime object by incrementing or decrementing in a format accepted by strtotime().
4 * Source code: ext/date/php_date.c
5 * Alias to functions: public date_modify()
6 */
8 //Set the default time zone
9 date_default_timezone_set("Europe/London");
11 echo "*** Testing DateTime::modify() : basic functionality ***\n";
13 // Create a date object to modify
14 $datetime = new DateTime("2009-01-31 14:28:41");
16 $datetime->modify("+1 day");
17 echo "After modification 1: " . $datetime->format("D, d M Y") . "\n";
19 $datetime->modify("+1 week 2 days 4 hours 2 seconds");
20 echo "After modification 2: " . $datetime->format("D, d M Y H:i:s") . "\n";
22 $datetime->modify("next Thursday");
23 echo "After modification 3: " . $datetime->format("D, d M Y") . "\n";
25 $datetime->modify("last Sunday");
26 echo "After modification 4: " . $datetime->format("D, d M Y") . "\n";
29 ===DONE===