note 60864 added to function.date

From: Date: Wed, 18 Jan 2006 18:28:36 +0000
Subject: note 60864 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-102038@lists.php.net to get a copy of this message
I had a hard time converting an arbitrary date to the correct week (weeks start on Sunday, ISO be damned). Here's how to do it: Given $date like '31 12 2005': print date('W', strtotime("$date") + 24*60*60 ); The additional 24*60*60 seconds are to make sure that Sunday is counted in the right week. Patrick ---- Server IP: 64.71.164.2Probable Submitter: 207.171.180.101 ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+60864 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60864&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60864&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60864&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60864&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60864&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60864&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60864&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+60864&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#102038) next »