两种方式获取当月第一天及最后一天
第一种:
$firstDay = date('Y-m-01', strtotime($date));
$lastDay = date('Y-m-d', strtotime(date('Y-m-01', strtotime($date)). ' 1 month -1 day'));
第二种:
$firstDay = date('Y-m-01', strtotime($date));
$lastDay = date('Y-m-d', strtotime("$firstDay +1 month -1 day"));