openbuildings/monetary 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

Build Status Latest Stable Version

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

GitHub 信息

  • Stars: 9
  • Watchers: 11
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2013-08-20