cjrasmussen/number

Simple functions for numeric conversions

1.0.4 2021-12-02 00:56 UTC

This package is auto-updated.

Last update: 2024-10-29 05:47:47 UTC


README

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.