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

Posted 每天增长一点点

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了获取指定月份的 开始时间和结束时间相关的知识,希望对你有一定的参考价值。

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);//指定月份月末时间戳

 

以上是关于获取指定月份的 开始时间和结束时间的主要内容,如果未能解决你的问题,请参考以下文章