php获取指定时间的上月份


主要用strtotime()这个函数
php 获得前一个月的月份
date("Y-m-d",strtotime("last month"));
php获得给定时间的前一个月时间
$record="20101001";
date("Ymd",strtotime("last month",strtotime($record)));


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM