byjg/wordnumber

Write float number in a word number.

Fund package maintenance!
byjg

5.0.0 2024-10-29 22:29 UTC

This package is auto-updated.

Last update: 2024-11-29 22:39:49 UTC


README

Build Status Opensource ByJG GitHub source GitHub license GitHub release

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();
}

Dependencies

Open source ByJG