小编Thi*_*oti的帖子

使用1月份+1个月时的"strtotime"错误

我正在尝试制作一个带有多个标签的ajax日历,用于之前输入的日期范围.但是例如:

我想要下个月,它打印行军而不是2月

$start= "2013-01-31";
$current =  date('n', strtotime("+1 month",$start)) //prints 3
Run Code Online (Sandbox Code Playgroud)

我认为这是因为2014年2月是28并且从开始月份开始增加+31基数,但为什么呢?

php date strtotime

4
推荐指数
1
解决办法
1935
查看次数

标签 统计

date ×1

php ×1

strtotime ×1