PHP获得月初月末时间戳,或得指定月份天数
2017-10-10 本文已影响0人
干爹训练营
/*获得月初月末时间戳*/
$thismonth = date('m');
$thisyear = date('Y');
$startDay = $thisyear . '-' . $thismonth . '-1';
$endDay = $thisyear . '-' . $thismonth . '-' . date('t', strtotime($startDay));
$month_start = strtotime($startDay);
$month_end = strtotime($endDay);
/*获得指定月份天数*/
cal_days_in_month(calender,$month,$year);