1--TEST--
2Test date_modify() function : basic functionality
3--FILE--
4<?php
5 //Set the default time zone
6date_default_timezone_set("Europe/London");
7
8echo "*** Testing date_modify() : basic functionality ***\n";
9
10// Create a date object to modify
11$datetime = date_create("2009-01-31 14:28:41");
12
13date_modify($datetime, "+1 day");
14echo "After modification 1: " . date_format($datetime, "D, d M Y") . "\n";
15
16date_modify($datetime, "+1 week 2 days 4 hours 2 seconds");
17echo "After modification 2: " . date_format($datetime, "D, d M Y H:i:s") . "\n";
18
19date_modify($datetime, "next Thursday");
20echo "After modification 3: " . date_format($datetime, "D, d M Y") . "\n";
21
22date_modify($datetime, "last Sunday");
23echo "After modification 4: " . date_format($datetime, "D, d M Y") . "\n";
24
25?>
26--EXPECT--
27*** Testing date_modify() : basic functionality ***
28After modification 1: Sun, 01 Feb 2009
29After modification 2: Tue, 10 Feb 2009 18:28:43
30After modification 3: Thu, 12 Feb 2009
31After modification 4: Sun, 08 Feb 2009
32