note 95487 added to function.date

From: Date: Tue, 05 Jan 2010 19:16:15 +0000
Subject: note 95487 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-164669@lists.php.net to get a copy of this message
About the function LastWeek() posted below last week of the year is wrong, I did the following to retrieve the good one : if ($lastweek==0){ $lastday = strtotime("-1 day 01 january".$year); $lastweek = date('W', $lastday); $year--; } in the loop, $week was called instead of lastweek : for ($i=1;$i<=7;$i++){ $arrdays[] = strtotime($year."W".$lastweek.$i); } ---- Server IP: 69.147.83.197 Probable Submitter: 109.79.150.166 ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- https://master.php.net/note/edit/95487 Del: integrated -- https://master.php.net/note/delete/95487/integrated Del: useless -- https://master.php.net/note/delete/95487/useless Del: bad code -- https://master.php.net/note/delete/95487/bad+code Del: spam -- https://master.php.net/note/delete/95487/spam Del: non-english -- https://master.php.net/note/delete/95487/non-english Del: in docs -- https://master.php.net/note/delete/95487/in+docs Del: other reasons-- https://master.php.net/note/delete/95487 Reject -- https://master.php.net/note/reject/95487 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#164669) next »