【发布时间】:2012-12-15 16:09:55
【问题描述】:
可能重复:
How to get previous month and year relative to today, using strtotime and date?
今天是 12 月 31 日,但 strtotime("-1 months") 返回 12 月:
echo date("Y-m", strtotime("-1 months"));
strtotime("last month") 也一样
如何正确返回上个月(11月)?
【问题讨论】: