PHPackages                             olesiavm/yii2-currency - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. olesiavm/yii2-currency

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

olesiavm/yii2-currency
======================

Average currency courses

05PHP

Since Apr 23Pushed 5y ago1 watchersCompare

[ Source](https://github.com/olesiavm/yii2-currency)[ Packagist](https://packagist.org/packages/olesiavm/yii2-currency)[ RSS](/packages/olesiavm-yii2-currency/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 library
============

[](#yii2-library)

Average currency courses

Есть 2 сервиса, возвращающие курсы валют:

[https://cash.rbc.ru/cash/json/converter\_currency\_rate/?currency\_from=USD&amp;currency\_to=RUR&amp;source=cbrf&amp;sum=1&amp;date=](https://cash.rbc.ru/cash/json/converter_currency_rate/?currency_from=USD&currency_to=RUR&source=cbrf&sum=1&date=)Необходимо написать библиотеку, которая будет вычислять средний курс евро и доллара по этим двум сервисам на передаваемую дату.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist olesiavm/yii2-currency "*"

```

or add

```
"olesiavm/yii2-currency": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
