arius/number-formatter
最新稳定版本:v1.1.0
Composer 安装命令:
composer require arius/number-formatter
包简介
Extended PHP NumberFormatter class.
README 文档
README
PHP NumberFormatter extended with additional ordinals not supported by ICU.
Feel free to add more languages. Fork, pull request and contribute!
How to
- composer.json
{
"require": {
"arius/number-formatter": "1.*"
}
}
- PHP
Use in code just like NumberFormatter class.
use Arius\NumberFormatter; $formatter = new NumberFormatter('pl', NumberFormatter::SPELLOUT); $formatter->setTextAttribute(NumberFormatter::DEFAULT_RULESET, "%spellout-ordinal"); $formatter->format(123);
Additional supported ordinals
- Polish (pl)
- spellout-ordinal
- spellout-ordinal-feminine
- spellout-ordinal-masculine
- spellout-ordinal-neuter
- 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)
统计信息
- 总下载量: 9.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 16
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-08