hnhdigital-os / php-number-converter
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 auto-updated.
Last update: 2024-11-29 03:54:34 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.