Skip to content

Releases: brick/money

0.5.1

10 Feb 14:21
c6f2883
Compare
Choose a tag to compare

👌 Improvement

BaseCurrencyProvider now always returns a BigNumber for convenience (#37).
This is useful if you're using BaseCurrencyProvider on its own, not just in CurrencyConverter.

Thanks @rdarcy1!

0.5.0

19 Aug 23:01
Compare
Choose a tag to compare

👌 Improvements

  • compatibility with brick/math version 0.9

⚠️ Caution

When using brick/math version 0.9, the Money factory methods such as of() and ofMinor() now accept decimal numbers in the form .123 and 123., and do not throw an exception anymore in this case.

0.4.5

31 May 14:23
Compare
Choose a tag to compare

🐛 Bug fix

MoneyBag::getAmount(), add() and subtract() would throw an exception when using a custom currency (#25).

0.4.4

23 Jan 18:16
Compare
Choose a tag to compare

New method

AbstractMoney::isAmountAndCurrencyEqualTo() compares a money to another. (#17)

This method is different from isEqualTo() in 2 aspects:

  • it only accepts another money, not a raw number;
  • it returns false if the money is in another currency, instead of throwing an exception.

0.4.3

09 Jan 10:32
Compare
Choose a tag to compare

🛠 Improvements

  • MoneyBag::getAmount() now accepts an ISO numeric currency code as well

New methods

  • CurrencyConverter::convertToRational() converts to a RationalMoney (#22)

0.4.2

04 Jul 15:12
Compare
Choose a tag to compare

Performance improvement when calling Money::formatTo() many times for the same locale.

0.4.1

17 Oct 12:25
Compare
Choose a tag to compare

Added support for brick/math version 0.8.

0.4.0

09 Oct 09:58
Compare
Choose a tag to compare

Breaking Changes

  • Deprecated method BigRational::toMoney() has been removed, use BigRational::to() instead;
  • BigRational::__toString() now always outputs the amount in non-simplified rational form.

New methods

  • BigRational::simplified() returns a copy of the money with the amount simplified.

0.3.4

12 Sep 11:15
Compare
Choose a tag to compare

ISO currency list update.

0.3.3

22 Aug 22:31
Compare
Choose a tag to compare

ISO currency list update.