bartfeenstra / cldr
Installs: 29 243
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 4
Forks: 1
Open Issues: 4
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is auto-updated.
Last update: 2024-11-29 04:35:46 UTC
README
Introduction
BartFeenstra/cldr is a PHP library to parse decimals, currency amounts, percentages, and even integers using Unicode Common Locale Data Repository number patterns. Unlike PHP's Intl extension, this library allows CLDR patterns to contain non-standard characters (such as HTML) and it does not have dependencies, which is ideal for shared hosting.
Usage
It offers four classes (CurrencyFormatter
, DecimalFormatter
,
IntegerFormatter
, and PercentageFormatter
) which accept a CLDR pattern and
optional replacements for replaceable special symbols, and can be reused to
format different numbers.
Requirements
- PHP 5.3.x or higher
- PHPUnit 3.7.* (for running tests only)