mrprompt/money

money and currency helper

1.1.0 2020-03-18 05:27 UTC

This package is auto-updated.

Last update: 2024-11-18 15:49:51 UTC


README

Build Status

Library to made work with currency and money easy.

Install

composer install mrprompt/money

Use

use MrPrompt\Money\Currency;

$money = new Currency('BRL');
$money->code(); // return the code (the same passed at constructor)
$money->number(); // return the code as number, like 960.
$money->name(); // return the currency name, like Real
$money->countries(); // return the countries that use the currency
$money->decimals(); // return the decimals used by the currency
$money->symbol(); // return the symbol of the currency
$money->format(1.00); // format the currency

License

GPLv3