cjrasmussen/number

Simple functions for numeric conversions


Keywords
numbers, roman numerals
License
MIT

Documentation

Number

Simple functions for numeric conversions.

Usage

use cjrasmussen\Number\Convert;

$num = Convert::intToOrdinal(153);
echo $num; // 153rd

$num = Convert::intToEnglish(153);
echo $num; // one-hundred fifty-three

$num = Convert::intToRoman(153);
echo $num; // CLIII

Installation

Simply add a dependency on cjrasmussen/number to your composer.json file if you use Composer to manage the dependencies of your project:

composer require cjrasmussen/number

Although it's recommended to use Composer, you can actually include the file(s) any way you want.

License

Number is MIT licensed.