bluora / php-number-converter
This package is abandoned and no longer maintained.
The author suggests using the hnhdigital-os/php-number-converter package instead.
Number to word, roman, ordinal converter
1.2.0
2021-02-27 03:13 UTC
Requires
- php: ^7.2|^8.0
Requires (Dev)
- phpmd/phpmd: ~2.0
- phpunit/phpunit: ^7.0
- squizlabs/php_codesniffer: ~3.0
- symfony/thanks: *
This package is not auto-updated.
Last update: 2022-02-01 13:03:16 UTC
README
This package provides the ability to convert a numerical number to a word, roman numeral, or include the ordinal suffix.
This package has been forked from saintkabyo/number-converter and further developed by H&H|Digital, an Australian botique developer. Visit us at hnh.digital.
Install
Via composer:
$ composer require hnhdigital-os/php-number-converter
Usage
Convert to word
Supported number range -2147483647 to 2147483647.
use HnhDigital/PhpNumberConverter; echo (new NumberConverter())->word(1);
one
Convert to roman
Supported number range 1 to 3999.
use HnhDigital/PhpNumberConverter; echo (new NumberConverter())->roman(1);
I
Ordinal (word + suffix)
Supported number range 1 to 2147483647.
use HnhDigital/PhpNumberConverter; echo (new NumberConverter())->wordOrdinal(1);
first
Ordinal (number + suffix)
Supported number range 1 to 2147483647.
use HnhDigital/PhpNumberConverter; echo (new NumberConverter())->numberOrdinal(1);
1st
Frameworks
Contributing
Please see CONTRIBUTING for details.
Credits
- Forked from saintkabyo/number-converter
- Rocco Howard
- All Contributors
License
The MIT License (MIT). Please see License File for more information.