PHP 클래스 Neos\FluidAdaptor\ViewHelpers\Format\DateViewHelper

= Examples = {dateObject} 1980-12-13 (depending on the current date) {dateObject} 01:23 (depending on the current time) +1 week 2 days 4 hours 2 seconds 13.12.1980 - 21:03:42 (depending on the current time, see http://www.php.net/manual/en/function.strtotime.php) @{someTimestamp} 13.12.1980 - 21:03:42 (depending on the current time. Don't forget the "@" in front of the timestamp see http://www.php.net/manual/en/function.strtotime.php) {f:format.date(date: dateObject)} 1980-12-13 (depending on the value of {dateObject}) {dateObject -> f:format.date()} 1980-12-13 (depending on the value of {dateObject}) {dateObject -> f:format.date(localeFormatType: 'date', forceLocale: true)} 13.12.1980 (depending on the value of {dateObject} and the current locale) {dateObject -> f:format.date(forceLocale: 'de_DE')} 13.12.1980 11:15:42 (depending on the value of {dateObject})
상속: extends Neos\FluidAdaptor\Core\ViewHelper\AbstractLocaleAwareViewHelper
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$datetimeFormatter Neos\Flow\I18n\Formatter\DatetimeFormatter
$escapeChildren boolean

공개 메소드들

메소드 설명
render ( mixed $date = null, string $format = 'Y-m-d', string $localeFormatType = null, string $localeFormatLength = null, string $cldrFormat = null ) : string Render the supplied DateTime object as a formatted date.

메소드 상세

render() 공개 메소드

Render the supplied DateTime object as a formatted date.
public render ( mixed $date = null, string $format = 'Y-m-d', string $localeFormatType = null, string $localeFormatLength = null, string $cldrFormat = null ) : string
$date mixed 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 http://cldr.unicode.org/translation/date-time)
리턴 string Formatted date

프로퍼티 상세

$datetimeFormatter 보호되어 있는 프로퍼티

protected DatetimeFormatter,Neos\Flow\I18n\Formatter $datetimeFormatter
리턴 Neos\Flow\I18n\Formatter\DatetimeFormatter

$escapeChildren 보호되어 있는 프로퍼티

protected bool $escapeChildren
리턴 boolean