Write float number in a word number.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/WordNumber
tests
.gitignore
.travis.yml
LICENSE
README.md
_config.yml
composer.json
example.php
phpunit.xml.dist

README.md

Wordnumber

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