Issue with 'W' in the date() function?
| From: | William Bailey | Date: | Tue, 03 Feb 2004 14:34:45 +0000 |
| Subject: | Issue with 'W' in the date() function? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-176678@lists.php.net to get a copy of this message | ||
Hi all,
Can somebody please explain this for me...
wb@vaio:/usr/home/wb [11]-> php
<?php
$time = strtotime('now -5 weeks');
printf("\n\n%s is in week %d of the year %d\n\n", date('Y-m-d', $time), date('W', $time), date('Y', $time));
?>
^D
2003-12-30 is in week 1 of the year 2003
wb@vaio:/usr/home/wb [12]->
Why does it return 1 as the week of the year for that date?