//获取给定时间的周日时间或月末时间或每天 private function endDate ($time, $type = 1, $openTime = '20:00:00') { if ($type == 1) { return date('Y-m-d ' . $openTime, $time); } elseif ($type == 2) { $w = strftime('%u', $time);//获取是周几的数字1-7 return date('Y-m-d ' . $openTime,