From 77875dc35974b7a0cac14de3284ced450c682ad0 Mon Sep 17 00:00:00 2001 From: Mikael Dalholm Date: Thu, 30 Dec 2021 14:44:07 +0100 Subject: [PATCH] Update readme --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 7a76b0c..6322c0c 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,12 @@ $money = money(2200); $money->convertTo(CZK::class); ``` +### Converting money and change rate +Sometimes you want to change the rate on the fly, just add the new rate as a second argument when converting. +```php +$money->convertTo(CZK::class, 1.0); // changes the CZK::class rate to 1.0 +``` + ### Comparing money instances **Equality of monetary value**