note 76460 modified in function.mktime by danbrown

From: Date: Sun, 20 Jul 2008 03:32:53 +0000
Subject: note 76460 modified in function.mktime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142072@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. <?php function days_in_month($year, $month) { return( date( "t", mktime( 0, 0, 0, $month, 1, $year) ) ); } ?> Hope it helps a soul out there. --was-- 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. http://php.net/manual/en/function.mktime.php

« previous php.notes (#142072) next »