Tags: stuck1a/polyfill
Tags
feature symfony#343 [PHP 8] Add IntlDateFormatter::RELATIVE_* constan… …ts (sebpacz) This PR was squashed before being merged into the 1.23-dev branch. Discussion ---------- [PHP 8] Add IntlDateFormatter::RELATIVE_* constants This PR adds polyfill for new constants introduced for dateType in the `IntlDateFormatter` class (see https://www.php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants). The new constants work the same as `IntlDateFormatter::FULL`, `IntlDateFormatter::LONG`, `IntlDateFormatter::MEDIUM`, `IntlDateFormatter::SHORT`, but yesterday, today, and tomorrow is displayed as yesterday, today, and tomorrow, respectively. Moreover, I discovered that the pattern is ignored if the date, that will be formatted is the today, yesterday, or tomorrow date. Commits ------- 0fb6d7f [PHP 8] Add IntlDateFormatter::RELATIVE_* constants
PreviousNext