1--TEST--
2Test DateTime::setDate() function : basic functionality
3--FILE--
4<?php
5/* Prototype  : public DateTime DateTime::setDate  ( int $year  , int $month  , int $day  )
6 * Description: Resets the current date of the DateTime object to a different date.
7 * Source code: ext/date/php_date.c
8 * Alias to functions: date_date_set()
9 */
10
11 //Set the default time zone
12date_default_timezone_set("Europe/London");
13
14echo "*** Testing DateTime::setDate() : basic functionality ***\n";
15
16$datetime = new DateTime("2009-01-30 19:34:10");
17
18echo $datetime->format(DATE_RFC2822) . "\n";
19
20$datetime->setDate(2008, 02, 01);
21
22echo $datetime->format(DATE_RFC2822) . "\n";
23
24?>
25===DONE===
26--EXPECTF--
27*** Testing DateTime::setDate() : basic functionality ***
28Fri, 30 Jan 2009 19:34:10 +0000
29Fri, 01 Feb 2008 19:34:10 +0000
30===DONE===