note 58484 deleted from function.date by derick
| From: | derick@php.net | Date: | Sun, 15 Jan 2006 12:37:21 +0000 |
| Subject: | note 58484 deleted from function.date by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-101814@lists.php.net to get a copy of this message | ||
Note Submitter: fab097 at gmail dot com
----
if you use mySQL "YEARWEEK" function, you may need to compute YearWeek in PHP...
with date("YW",$date) you will have trouble because week number may overflow year, and the
"Y" is not synchronized.
for example, 30th december of year 2003. is the 1st week of year 2004.
date("YW",$date) gives wrongly "200301" !
then you better use date("oW",$date) that gives you "200401".