php strtotime“2012年4月的最后一个星期五”上周五没有回来
发布时间:2020-12-13 22:09:23 所属栏目:PHP教程 来源:网络整理
导读:当我运行以下代码时,我得到4月30日而不是27日. strtotime("Last Friday April 2012"); 我尝试将它作为星期四运行,而我又回到了第29位. 以下所有工作都很好. strtotime("First Sunday February 2012");strtotime("Third Monday February 2012");strtotime("Se
当我运行以下代码时,我得到4月30日而不是27日.
strtotime("Last Friday April 2012"); 我尝试将它作为星期四运行,而我又回到了第29位. 以下所有工作都很好. strtotime("First Sunday February 2012"); strtotime("Third Monday February 2012"); strtotime("Second Monday October 2012"); strtotime("Fourth Thursday November 2012"); 有任何想法吗? 解决方法
我相信你会回到3月30日,而不是4月,对吗?
上周五2012年4月执行以下操作: > 2012年4月将日期确定为2012-04-01 如果您想在四月的最后一个星期五,请使用2012年5月的最后一个星期五, 请参阅PHP手册中的Date/Time – Relative Formats. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |