note 64043 added to function.date

From: Date: Thu, 06 Apr 2006 10:35:11 +0000
Subject: note 64043 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-107438@lists.php.net to get a copy of this message
in the function : $lastmonth = mktime(0,0,0,date("m")-1,date("d"),date("Y")) is an error when the current day is greater as the last day of the last month! example: now -> 31.05.2006 output -> 01.05.2006 in place of 31.04.2006 (its right, because the 31th ist a wrong day) solotuion: $lastmonth = mktime(0,0,0,date("m")-1,1,date("Y")) ---- Server IP: 217.160.72.57 Probable Submitter: 84.160.141.192 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/note/edit/64043 Del: integrated -- http://master.php.net/note/delete/64043/integrated Del: useless -- http://master.php.net/note/delete/64043/useless Del: bad code -- http://master.php.net/note/delete/64043/bad+code Del: spam -- http://master.php.net/note/delete/64043/spam Del: non-english -- http://master.php.net/note/delete/64043/non-english Del: in docs -- http://master.php.net/note/delete/64043/in+docs Del: other reasons-- http://master.php.net/note/delete/64043 Reject -- http://master.php.net/note/reject/64043 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107438) next »