note 76460 added to function.mktime

From: Date: Tue, 17 Jul 2007 04:52:47 +0000
Subject: note 76460 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-128638@lists.php.net to get a copy of this message
Finding out the number of days in a given month and year, accounting for leap years when February has more than 28 days. function days_in_month($year, $month) { return( date( "t", mktime( 0, 0, 0, $month, 1, $year) ) ); } Hope it helps a soul out there. ---- Server IP: 208.69.120.35 Probable Submitter: 71.198.84.137 ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit -- https://master.php.net/note/edit/76460 Del: integrated -- https://master.php.net/note/delete/76460/integrated Del: useless -- https://master.php.net/note/delete/76460/useless Del: bad code -- https://master.php.net/note/delete/76460/bad+code Del: spam -- https://master.php.net/note/delete/76460/spam Del: non-english -- https://master.php.net/note/delete/76460/non-english Del: in docs -- https://master.php.net/note/delete/76460/in+docs Del: other reasons-- https://master.php.net/note/delete/76460 Reject -- https://master.php.net/note/reject/76460 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128638) next »