Bug #44361

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

Added by Jerzy no-lastname-given about 8 years ago. Updated over 7 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
I18n
Start date:
2013-01-07
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.4
Has patch:
No
Complexity:

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)}

#1

Updated by Karsten Dambekalns over 7 years ago

  • Target version changed from 2.0 to 2.0.1

Also available in: Atom PDF