openbuildings/monetary
最新稳定版本:0.5.0
Composer 安装命令:
composer require openbuildings/monetary
包简介
Useful tool for formatting and converting currencies
README 文档
README
Useful tool for formatting and converting currencies in PHP
The main features are:
- formatting an amount in a certain currency;
- converting an amount from one currency to another.
The Monetary library takes care of fetching exchange rates from remote services and caching them.
You can easily use your own exchange rates source or cache solution.
Installation
Install via Composer
composer require openbuildings/monetary
Basic Usage
Use the namespace:
use OpenBuildings\Monetary\Monetary;
then just convert and format currencies:
echo Monetary::instance()->convert(10, 'USD', 'GBP'); // 7.5091987684914 echo Monetary::instance()->format(15.3, 'GBP'); // £15.30
统计信息
- 总下载量: 207.48k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2013-08-20