PHP strtotime incrementing by weekdays

最后都变了- 提交于 2019-11-30 19:15:20

It's a bug.

It has been fixed in >= 5.5.0.

So you'll need to work around it or upgrade your php version.

<?php
$today = strtotime('2015-04-17 00:00:00');

echo date('m/d/Y', strtotime("+5 weekdays", $today));
echo "\n";
echo phpversion( );
?>

Working in 5.6*

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!