以下代码.
strtotime("first saturday", strtotime("+2 month"));
Run Code Online (Sandbox Code Playgroud)
工作正常,但四月+2 month,十月+ 8 month和十二月的月份+ 10 month是在那个月的第二个星期六而不是第一个星期六.
是什么原因导致它以及如何阻止它.
奇妙
$saturday = strtotime("first saturday", strtotime("+2 month", strtotime(date("01-m-Y"))));
Run Code Online (Sandbox Code Playgroud)