繁体   English   中英

PHP的strtotime星期四不工作

[英]php strtotime thursday not working

我有php函数来获取本周和下周的日期。 星期四除外,一切都很好-星期四的输出为空。

这是我的代码:

$pondeli1 = date( 'd.m.Y', strtotime( 'monday this week' ) );
$utery1 = date( 'd.m.Y', strtotime( 'tuesday this week' ) );
$streda1 = date( 'd.m.Y', strtotime( 'wednesday this week' ) );
$ctrvtek1 = date( 'd.m.Y', strtotime( 'thursday this week' ) );
$patek1 = date( 'd.m.Y', strtotime( 'friday this week' ) );

$pondeli2 = date( 'd.m.Y', strtotime( 'monday next week' ) );
$utery2 = date( 'd.m.Y', strtotime( 'tuesday next week' ) );
$streda2 = date( 'd.m.Y', strtotime( 'wednesday next week' ) );
$ctrvtek2 = date( 'd.m.Y', strtotime( 'thursday next week' ) );
$patek2 = date( 'd.m.Y', strtotime( 'friday next week' ) );

而且“下周星期四”的行没有返回任何内容...

请问哪里有问题?

尝试使用

$ctrvtek2 =strtotime("next Thursday",$ctrvtek1);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM