Bug #44361

TYPO3\Flow\I18n\Formatter\DatetimeFormatter - caching DATETIME type

Added by Jerzy no-lastname-given over 2 years ago. Updated almost 2 years ago.

Status:New Start date:2013-01-07
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:I18n
Target version:TYPO3 Flow Base Distribution - 2.0.1
PHP Version:5.4 Complexity:
Has patch:No Affected Flow version:Flow 2.0.0 beta 1

Description

I've encountered problem with DatetimeFormatter using \TYPO3\Flow\I18n\Cldr\Reader\DatesReader::FORMAT_TYPE_DATETIME with multiple FORMAT_LENGTH_* options - after refreshing site, output is the same for all of them. It works fine with separete FORMAT_TYPE_DATE and FORMAT_TYPE_TIME.

Code sample:

            $someDate = new \DateTime();

            $full = $this->i18nDateFormater->format($someDate, $locale, array(
                \TYPO3\Flow\I18n\Cldr\Reader\DatesReader::FORMAT_TYPE_DATETIME,
                \TYPO3\Flow\I18n\Cldr\Reader\DatesReader::FORMAT_LENGTH_FULL
            ));
            var_dump($full);

            $short = $this->i18nDateFormater->format($someDate, $locale, array(
                \TYPO3\Flow\I18n\Cldr\Reader\DatesReader::FORMAT_TYPE_DATETIME,
                \TYPO3\Flow\I18n\Cldr\Reader\DatesReader::FORMAT_LENGTH_SHORT
            ));
            var_dump($short);

Same thing with view helper:

    {f:format.date(date: 'now', localeFormatType: 'dateTime',  localeFormatLength: 'full', forceLocale: true)}
    {f:format.date(date: 'now', localeFormatType: 'dateTime',  localeFormatLength: 'short', forceLocale: true)}

History

#1 Updated by Karsten Dambekalns almost 2 years ago

  • Target version changed from 2.0 to 2.0.1

Also available in: Atom PDF