Bug #44361
TYPO3\Flow\I18n\Formatter\DatetimeFormatter - caching DATETIME type
Status:
New
Priority:
Should have
Assignee:
-
Category:
I18n
Target version:
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)}