byjg/wordnumber

Write float number in a word number.

1.0.2 2018-03-09 05:40 UTC

README

Build Status

Write float number in a word number.

Support multiple languages. Until this moment supports

Examples

$wordNumber = new \ByJG\WordNumber\EnglishWordNumber();
$wordnumber->write(12.34);  # writes twelve dollars and third four cents

or

$wordNumber = new \ByJG\WordNumber\PortugueseWordNumber();
$wordnumber->write(12.34);  # writes doze reais e trinta e quatro centavos.

Create other languages

You have to implement the interface WordNumberInterface with the proper word number in your language. If you create feel free to send to us.

interface WordNumberInterface
{
    public function concatWord();

    public function currency();

    public function tens();

    public function unit();

    public function elevenToNineteen();

    public function twentyToNinety();

    public function hundreds();

    public function oneHundred();
}