note 43090 deleted from function.checkdate by tomsommer
| From: | tomsommer@php.net | Date: | Thu, 15 Jul 2004 15:12:12 +0000 |
| Subject: | note 43090 deleted from function.checkdate by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73302@lists.php.net to get a copy of this message | ||
Note Submitter: goochivasquez@yahoo.co.uk
----
I used this function to determine the last day of a month.
If you know an easier way you can always post it here.
function last_day_of_month ($month, $year)
{
$day=0;
while ( 1 )
{
$day++;
if ( !( checkdate($month,$day,$year) ) ) { break; }
}
return ($day-1);
}