我正在尝试让我第二段代码的输出变成荷兰语。第一段代码给出了正确的输出,但是是英文。我试图将其转换为荷兰语,但通常最终会得到1970年1月1日、2015年12月12日或什么都没有的结果。该代码应该给出本周的下一个星期五,除非已经过了星期一,那么就是下周的星期五。
我的可用代码,但是是英文。
我的可用代码,但是是英文。
<?php
$d = strtotime('today');
switch ($d) {
case strtotime('monday'):
case strtotime('friday'):
case strtotime('saturday'):
case strtotime('sunday'):
$ff = strtotime('next friday');
$ffn = date('l d M', $ff);
echo $ffn;
break;
case strtotime('tuesday'):
case strtotime('wednesday'):
case strtotime('thursday'):
$ff = strtotime('next friday' . '+ 7days');
$fft = date('l d M', $ff);
echo $fft;
break;
default:
echo "Something went wrong";
}
?>
我的代码输出是荷兰语,但日期不对(它给出的是今天的日期,而不是下周五/下周的星期五)。
顺便说一下,这是我第一次在这里提问,所以可能会有点含糊或其他问题;)