note 58484 added to function.date

From: Date: Sat, 05 Nov 2005 18:59:49 +0000
Subject: note 58484 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-98135@lists.php.net to get a copy of this message
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". ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58484 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58484&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58484&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58484&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58484&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58484&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58484&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58484&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58484&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#98135) next »