php自动获取上一个月的起始时间php

/ / 2016-10-12   阅读:2559
$last_month = date('Y-m', strtotime('last month')); $last['first'] = $last_month . '-01 00:00:00'; $last['end'] = date(‘Y-m-d H:i:s’, strtotime("$last_month +1 month -1 day +23 hours +59 minute...
$last_month = date('Y-m', strtotime('last month'));
$last['first'] = $last_month . '-01 00:00:00';

$last['end'] = date(‘Y-m-d H:i:s’, strtotime("$last_month +1 month -1 day +23 hours +59 minutes +59 seconds"));

我要评论

昵称:
验证码:

最新评论

共0条 共0页 10条/页 首页 上一页 下一页 尾页
意见反馈