-1

我使用的是 TYPO3 系统。

欧洲夏令时结束March 31并结束October 27。有没有办法在打字稿中创造条件,或者

[condition]

使用if, 来检测我们是否在这些日期之间?

4

1 回答 1

1

由于无法嵌套排版条件,我会说不。我建议使用用户功能:

<?php

function user_isSummertime() {
  /* check whether it is summertime */
  if ($summertime) {
     return true;
  }
  return false;
}
?>

这进入你的local.conf:

require_once('fileadmin/path/to/script/my_userfunc.php');

[userFunc = user_isSummertime()]
  #typoscript
[global]

在这里我找到了一种检查夏令时的 php 方法: http://phpsnips.com/113/Calculate-Central-European-Summer-Time-(CEST)# .UW1c1aDrFyA

于 2013-04-16T14:10:34.200 回答