note 64043 deleted from function.date by derick
| From: | derick@php.net | Date: | Sun, 11 Jun 2006 11:45:09 +0000 |
| Subject: | note 64043 deleted from function.date by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-114259@lists.php.net to get a copy of this message | ||
Note Submitter: Andre
----
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"))