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

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.

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status StyleCI Test Coverage Issue Count Code Climate

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

License

The MIT License (MIT). Please see License File for more information.