DateViewHelper extends AbstractViewHelper

ViewHelper

This class is the implementation of a Fluid ViewHelper.

View this class in the TYPO3 ViewHelper reference: <f:format.date>

FinalYes

ViewHelper to format an object implementing `\DateTimeInterface` into human-readable output.

  <f:format.date format="Y-m-d H:i">{dateObject}</f:format.date>
  <f:format.date format="Y" base="{dateObject}">-1 year</f:format.date>
  <f:format.date pattern="dd. MMMM yyyy" locale="de-DE">{dateObject}</f:format.date>
Tags
see
https://www.php.net/manual/datetime.format.php
see
https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-format-date
see
DateTimeInterface

Table of Contents

Properties

$escapeChildren  : bool
Needed as child node's output can return a DateTime object which can't be escaped

Methods

getContentArgumentName()  : string
Explicitly set argument name to be used as content.
initializeArguments()  : void
render()  : string

Properties

$escapeChildren

Needed as child node's output can return a DateTime object which can't be escaped

protected bool $escapeChildren = false

Methods

getContentArgumentName()

Explicitly set argument name to be used as content.

public getContentArgumentName() : string
Return values
string

initializeArguments()

public initializeArguments() : void

render()

public render() : string
Tags
throws
Exception
Return values
string

        
On this page

Search results