function date_last_day_of_month in Date 5
Find the last day of a month
Parameters
mixed $month:
mixed $year:
Return value
last day of the specified month and year
File
- ./
date.inc, line 1548 - Date/time API functions
Code
function date_last_day_of_month($month, $year) {
return date_gmdate('t', date_gmmktime(array(
'year' => intval($year),
'mon' => intval($month),
'mday' => 1,
)));
}