php 获取指定日期所在月份的最后一天
作者:互联网
php 获取指定月最后一天:
<?php
function getthemonth($date)
{
$firstday = date('Y-m-01', strtotime($date));
$lastday = date('Y-m-d', strtotime("$firstday +1 month -1 day"));
return $lastday;
}
echo getthemonth('2011-5-16');
?>
标签:getthemonth,firstday,strtotime,获取,日期,date,lastday,php 来源: https://www.cnblogs.com/T8888/p/15668577.html