- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
private function getLastDate($year, $month)
{
$next_year = $year;
$next_month = $month + 1;
if ($next_month == 13) {
$next_month = 1;
$next_year++;
}
$next_time = mktime(0, 0, 0, $next_month, 1, intval($next_year));
$lastdate = strtotime('-1 day', $next_time);
$last_day = date('d', $lastdate);
return $last_day;
}