Download the PHP package antonienko/money-formatter without Composer
On this page you can find all versions of the php package antonienko/money-formatter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download antonienko/money-formatter
More information about antonienko/money-formatter
Files in antonienko/money-formatter
Package money-formatter
Short Description Formatter for moneyphp/money library using alcohol/iso4217 for obtaining the number of decimal digits in each currency
License MIT
Homepage http://www.antoniohs.com/2016/03/03/antonienkomoneyformatter-2-0/
Informations about the package money-formatter
Money Formatter
Class to convert Moneyphp/money objects to the base unit representation of the given currency (float) or to a string representation given a locale, using php's intl extension.
To do so it leverages the info provided by the iso4217 library from Alcohol in order to know the exact number of decimal places that each currency uses.
Installation
Composer
This library is available in packagist.org, you can add it to your project via Composer.
In the "require" section of your composer.json file:
Always up to date (bleeding edge, API not guaranteed stable)
Specific minor version, API stability
Features
- Convert a Money Object to float value, depending on the number of decimal places used by the currency.
- Convert a Money Object to string, formatted using the provided locale.
- Get the currency symbol of a Money Object, either just the symbol or the full currency symbol (The "just the symbol" option for Canadian Dollar would be '$', but if you are in the USA you would need the "full symbol" option "CA$")
- Get the symbol position for a given locale (right or left position)
Sample Usage
License Information
Licensed under The MIT License (MIT). See the LICENSE file for more details.
All versions of money-formatter with dependencies
symfony/yaml Version ~2.0
ext-intl Version 1.1.*
ext-mbstring Version *
mathiasverraes/money Version ~3.0@beta
alcohol/iso4217 Version ~2.0