ViewHelper Documentation

Formats a \DateTime object.

= Examples =

<>{dateObject}</> 1980-12-13 (depending on the current date)

< format="H:i">{dateObject}</> 01:23 (depending on the current time)

< format="d.m.Y - H:i:s">+1 week 2 days 4 hours 2 seconds</> 13.12.1980 - 21:03:42 (depending on the current time, see

13.12.1980 - 21:03:42

{ dateObject)} 1980-12-13 (depending on the value of {dateObject})

{dateObject ->} 1980-12-13 (depending on the value of {dateObject})

{dateObject -> 'date', forceLocale: true)} 13.12.1980 (depending on the value of {dateObject} and the current locale)

{dateObject -> 'de_DE')} 13.12.1980 11:15:42 (depending on the value of {dateObject})


forceLocale anySimpleType

Whether if, and what, Locale should be used. May be boolean, string or \Neos\Flow\I18n\Locale

date anySimpleType

either a \DateTime object or a string that is accepted by \DateTime constructor

format string

Format String which is taken to format the Date/Time if none of the locale options are set.

localeFormatType string

Whether to format (according to locale set in $forceLocale) date, time or datetime. Must be one of Neos\Flow\I18n\Cldr\Reader\DatesReader::FORMAT_TYPE_*'s constants.

localeFormatLength string

Format length if locale set in $forceLocale. Must be one of Neos\Flow\I18n\Cldr\Reader\DatesReader::FORMAT_LENGTH_*'s constants.

cldrFormat string

Format string in CLDR format (see

ViewHelper Resources

Schema Resources