PHPbugstrtotime

echo date('Y-m',strtotime('-1 months'));
echo "\r\n";
echo date('Y-m',strtotime('first day of last month'));
echo "\r\n";
echo date('Y-m',strtotime('-1 week'));

创新互联建站主营辽阳网站建设的网络公司,主营网站建设方案,重庆APP软件开发,辽阳h5小程序开发搭建,辽阳网站营销推广欢迎辽阳等地区企业咨询

PHP bug strtotime

当遇到月为31日是 date('Y-m',strtotime('-1 months'));求的月份还是当月的

正确使用方式

echo date('Y-m',strtotime('first day of last month'));

echo date('Y-m-d H:i:s', strtotime('-1 month', strtotime(date('Y-m'))));


网站栏目:PHPbugstrtotime
文章链接:http://zjjierui.cn/article/jcgooh.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款