2017 © Pedro Peláez
 

library number-formatter

Extended PHP NumberFormatter class.

image

arius/number-formatter

Extended PHP NumberFormatter class.

  • Wednesday, November 11, 2015
  • by arius86
  • Repository
  • 1 Watchers
  • 10 Stars
  • 275 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 11 % Grown

The README.md

arius/number-formatter

Build Status Coverage Status SensioLabsInsight, (*1)

PHP NumberFormatter extended with additional ordinals not supported by ICU., (*2)

Feel free to add more languages. Fork, pull request and contribute!, (*3)

How to

1. composer.json

{
     "require": {
        "arius/number-formatter": "1.*"
     }
}

2. PHP

Use in code just like NumberFormatter class., (*4)

use Arius\NumberFormatter;

$formatter = new NumberFormatter('pl', NumberFormatter::SPELLOUT);
$formatter->setTextAttribute(NumberFormatter::DEFAULT_RULESET, "%spellout-ordinal");

$formatter->format(123);

Additional supported ordinals

1. Polish (pl)

  • spellout-ordinal
  • spellout-ordinal-feminine
  • spellout-ordinal-masculine
  • spellout-ordinal-neuter

2. Russian (ru)

  • spellout-ordinal
  • spellout-ordinal-feminine
  • spellout-ordinal-masculine
  • spellout-ordinal-neuter
  • spellout-ordinal-plural (plural isn't part of ICU in all languages)

The Versions

11/11 2015

dev-master

9999999-dev

Extended PHP NumberFormatter class.

  Sources   Download

MIT

The Requires

  • php >=5.4
  • ext-intl >=1.0

 

The Development Requires

by Arkadiusz Ostrycharz

11/11 2015

v1.1.0

1.1.0.0

Extended PHP NumberFormatter class.

  Sources   Download

MIT

The Requires

  • php >=5.4
  • ext-intl >=1.0

 

The Development Requires

by Arkadiusz Ostrycharz

11/11 2015

dev-feature-spellout-ru

dev-feature-spellout-ru

Extended PHP NumberFormatter class.

  Sources   Download

MIT

The Requires

  • php >=5.4
  • ext-intl >=1.0

 

The Development Requires

by Arkadiusz Ostrycharz

14/02 2015

v1.0.1

1.0.1.0

Extended PHP NumberFormatter class.

  Sources   Download

MIT

The Requires

  • php >=5.4
  • ext-intl >=1.0

 

The Development Requires

by Arkadiusz Ostrycharz

08/02 2015

v1.0.0

1.0.0.0

Extended PHP NumberFormatter class.

  Sources   Download

MIT

The Requires

  • php >=5.4
  • ext-intl >=1.0

 

The Development Requires

by Arkadiusz Ostrycharz