// 得到指定日期 // [2018-10-12] public function GetMonth($date){ $firstday = date("Y-m-01",strtotime($date)); $lastday = date("Y-m-d",strtotime("$firstday +1 month -1 day")); return ['startime'=>$firstday,'endtime'=>$lastday]; }