获取指定月份的 开始时间和结束时间

1 $Y = 2015;//获取年 
2 $m = 8;//获取月
3 $month = $Y."-".$m;//当前年月  
4 $month_start = strtotime($month);//指定月份月初时间戳  
5 $month_end = mktime(23, 59, 59, date('m', strtotime($month))+1, 00);//指定月份月末时间戳

 

posted @ 2018-02-01 14:15  不一样的开始  阅读(377)  评论(0)    收藏  举报