4 * This file is part of the TYPO3 CMS project.
6 * It is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU General Public License, either version 2
8 * of the License, or any later version.
10 * For the full copyright and license information, please read the
11 * LICENSE.txt file that was distributed with this source code.
13 * The TYPO3 project - inspiring people to share!
16 namespace TYPO3\CMS\IndexedSearch\ViewHelpers\Format
;
18 use TYPO3\CMS\Backend\Utility\BackendUtility
;
19 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface
;
20 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper
;
21 use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic
;
27 class DateTimeViewHelper
extends AbstractViewHelper
29 use CompileWithRenderStatic
;
32 * The rendered children are fed into data() function, which expects an integer.
33 * It reduces overhead and is safe to disable children escaping here.
37 protected $escapeChildren = false;
40 * Render the given timestamp as date & time
42 * @param array $arguments
43 * @param \Closure $renderChildrenClosure
44 * @param RenderingContextInterface $renderingContext
48 public static function renderStatic(array $arguments, \Closure
$renderChildrenClosure, RenderingContextInterface
$renderingContext)
50 return BackendUtility
::datetime($renderChildrenClosure());