Releases: h4kuna/number-format
Releases · h4kuna/number-format
v6.0.0
- global namespace
h4kuna\Number
renamed toh4kuna\Format
- add new namespace
h4kuna\Format\Date
, other files move to namespaceh4kuna\Format\Number
- behavior is same like v5.0 but namespaces are different
- add support for php native NumberFormatter
- I don't keep back compatibility, because v5.0 is not widespread, but here are aliases. You can add to your project and
will work.
back compatibility with v5
use h4kuna;
class_alias(h4kuna\Format\Number\Formats::class, 'h4kuna\Number\Utils\Formats');
class_alias(h4kuna\Format\Number\NumberFormat::class, 'h4kuna\Number\Format');
class_alias(h4kuna\Format\Number\Percent::class, 'h4kuna\Number\Percent');
class_alias(h4kuna\Format\Number\Round::class, 'h4kuna\Number\Utils\Round');
class_alias(h4kuna\Format\Number\Tax::class, 'h4kuna\Number\Tax');
class_alias(h4kuna\Format\Number\UnitValue::class, 'h4kuna\Number\Utils\UnitValue');
// parameters
class_alias(h4kuna\Format\Number\Parameters\ZeroClear::class, 'h4kuna\Number\Parameters\Format\ZeroClear');
// formatters
class_alias(h4kuna\Format\Number\Formatters\NumberFormatter::class, 'h4kuna\Number\NumberFormat');
// namespace Unit
class_alias(h4kuna\Format\Number\Units\Byte::class, 'h4kuna\Number\Units\Byte');
class_alias(h4kuna\Format\Number\Units\Unit::class, 'h4kuna\Number\Units\Unit');
class_alias(h4kuna\Format\Number\Units\UnitFormat::class, 'h4kuna\Number\Units\UnitFormat');
v5.0.4
v5.0.0
v4.0.0
- removed dependency on h4kuna/data-type
- support php 7.4+
- removed interface NumberFormat
- renamed class NumberFormat -> NumberFormat
- removed class UnitFormatState, replace by
(new NumberFormat)->enableExtendFormat()
- removed class UnitPersistentFormatState, replace by
(new NumberFormat)->enableExtendFormat('1 MY_PERSISTENT_UNIT')
- method format has second parameter like decimals and third is dynamic defined unit
- char for unit in mask changed to
⎵