You need to update your PHP version.
New type specifier to get the abbreviation of month name.
The Factory
creates an IntlFormatter
instance with every formatter available in the project.
Intl-Format is ready for PHP 8.
PrecisionNumberFormatter
now supports 0 and space padding characters:
- 3number (spaces)
- 03number (zeros)
This can be combined with comma values (03.2number).
The only chars that are currently supported are #
, -
, +
.
An example would be "%'#2my_specifier".
Numeric padding characters are supported now to create type specifiers with a variable numeric number like "%5my_specifier" or in combination with fractional digits like "%5.2my_specifier".
New type specifier to get the short year of a date.
You need to update your PHP version.
timezone_id, timezone_name and timezone_short are introduced to replace the "timeseries" type specifiers.
New type specifier to get the number of the week of a year and a month.
The type specifiers date_weekday_abbr
, quarter
, quarter_abbr
and quarter_name
got added to Budgegeria\IntlFormat\Formatter\MessageFormatter
First argument: Previously an array of instances implementing FormatterInterface
,
it now can be everything iterable
.
Second argument: An instance of MessageParserInterface
has to be explicit
injected.
IntlFormat is now being final
. For testing or implementation purposes,
use the new interfaces Budgegeria\IntlFormat\IntlFormatInterface
and
Budgegeria\IntlFormat\FormatterStorageInterface
.
The Factory
uses IntlFormatInterface as return type now.
You need to update your PHP version.
New Formatter class added:
Budgegeria\IntlFormat\Formatter\CurrencySymbolFormatter
A possible ReDoS vulnerability in SprintfParser
got fixed.
In previous versions it wasn't possible to use argument swapping beyond %9$arg
.
%10$arg
, %11$arg
and above are now supported.
The constants for the type specifier in TimeZoneFormatter
aren't accessible
from the outside of the class.
In case IntlFormat
got extended by a custom class and addFormatter()
got
overridden, the added void return type has to be added in the custom class too.
Named constructor in MessageFormatter
got return types.
Because of some incompatibilities to the Intl-extension, DateTimeImmutable wasn't usable in the older versions of Intl-Format. Support was added for Intl-Format 1.3.
You need to update your PHP version.
The support if HHVM was dropped in this version.
Exceptions of same type have now exception code to differ between use cases.
The "number" type specifier now supports fraction digits with a sprintf-like syntax. This was implemented in class
Budgegeria\IntlFormat\Formatter\PrecisionNumberFormatter
New Formatter classes added:
Budgegeria\IntlFormat\Formatter\SprintfFormatter
Budgegeria\IntlFormat\Formatter\ExceptionFormatter
which are not part of the default Factory method