Home >php教程 >PHP源码 >PHP获取指定月份的第一天和最后一天

PHP获取指定月份的第一天和最后一天

PHP中文网
PHP中文网Original
2016-05-25 17:14:29902browse

1. [代码][PHP]代码    

$date = date(time());
$start_date = date('Y-m-d', mktime(00, 00, 00, date('m', strtotime($date))+1, 01));
$end_date = date('Y-m-d', mktime(23, 59, 59, date('m', strtotime($date))+2, 00));

                   

                   

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn