美文网首页
PHP获得月初月末时间戳,或得指定月份天数

PHP获得月初月末时间戳,或得指定月份天数

作者: 干爹训练营 | 来源:发表于2017-10-10 17: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);

相关文章

网友评论

      本文标题:PHP获得月初月末时间戳,或得指定月份天数

      本文链接:https://www.haomeiwen.com/subject/xffyyxtx.html