php strtotime星期四不工作

时间:2016-02-19 10:50:32

标签: php strtotime

我有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' ) );

下周星期四""没有回来任何东西......

请问哪里有问题?

1 个答案:

答案 0 :(得分:2)

尝试使用

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