1--TEST-- 2Test DateTime::setISODate() function : basic functionality 3--FILE-- 4<?php 5echo "*** Testing DateTime::setISODate() : basic functionality ***\n"; 6 7//Set the default time zone 8date_default_timezone_set("Europe/London"); 9 10// Create a deate object 11$datetime = new DateTime("2009-01-30 17:57:32"); 12 13// Which month is week 40 ? 14$datetime->setISODate(2008, 40); 15echo "Week 40 of 2009 is in \"" . $datetime->format("F") . "\"\n"; 16 17// What date is week week 30 day 3 ? 18$datetime->setISODate(2009, 30, 3); 19echo "Week 30 day 3 of 2009 is \"" . $datetime->format("D M j") . "\"\n"; 20 21// What date was is last year ? 22$datetime->setISODate(2008, 30, 3); 23echo "..same day last year was \"" . $datetime->format("D M j") . "\"\n"; 24 25?> 26--EXPECT-- 27*** Testing DateTime::setISODate() : basic functionality *** 28Week 40 of 2009 is in "September" 29Week 30 day 3 of 2009 is "Wed Jul 22" 30..same day last year was "Wed Jul 23" 31