note 2988 deleted from function.mktime by vincent

From: Date: Thu, 11 Sep 2003 20:32:50 +0000
Subject: note 2988 deleted from function.mktime by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-56244@lists.php.net to get a copy of this message
Note Submitter: mgrphp3@cgocable.net ---- The last day of any given month can be expressed as the 0 day of the next month, not the -1 day. Example: $lastday=mktime(0,0,0,3,-1,2000); echo strftime("Last day in Feb 2000 is: %d<br>",$lastday); will produce 28, whereas: $lastday=mktime(0,0,0,3,0,2000); echo strftime("Last day in Feb 2000 is: %d<br>",$lastday); will produce 29.

« previous php.notes (#56244) next »