ilknur-dogan/exchange-rate 问题修复 & 功能扩展

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

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

ilknur-dogan/exchange-rate

最新稳定版本:v1.0.1

Composer 安装命令:

composer require ilknur-dogan/exchange-rate

包简介

Exchange rate transformation package

README 文档

README

Latest Stable Version Total Downloads Dependents License StyleCI

This library is designed to fetch exchange rates from the Central Bank of the Republic of Turkey (TCMB) and perform currency conversions for specific dates.

Installation

You can install this library using Composer.

composer require ilknur-dogan/exchange-rate

Usage

1. Fetching Exchange Rates

You can use the getRate method to retrieve exchange rates for a specific date.

getRate($date)
  • Returns exchange rates for the specified date as an array.
  • $date: The date for which exchange rates are to be retrieved (in YYYY-MM-DD format).
require 'vendor/autoload.php';

use IlknurDogan\ExchangeRate\ExchangeRate;

$exchangeRate = new ExchangeRate();
$rates = $exchangeRate->getRate('2024-08-01'); // Example date
print_r($rates);

2. Currency Conversion

You can use the convert method to perform a currency conversion between two currencies for a specific date.

convert($date, $from, $to)
  • Returns the conversion rate between the two currencies for the specified date (as a string).
  • $date: The date for which the exchange rate is to be used (in YYYY-MM-DD format).
  • $from: The currency to be converted from (e.g., USD).
  • $to: The currency to be converted to (e.g., EUR).
require 'vendor/autoload.php';

use IlknurDogan\ExchangeRate\ExchangeRate;

$exchangeRate = new ExchangeRate();
$convertedAmount = $exchangeRate->convert('2024-08-01', 'USD', 'EUR'); // Example date and currencies
echo $convertedAmount;

License

This package is open source software licensed under the MIT License.

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固