Releases: kipcole9/money
Money version 5.12.1
Bug Fixes
- Removes compile-time warnings for Elixir 1.14 (use
Application.compile_env/2
, notApplication.get_env/2
)
Money version 5.12.0
Enhancements
- Add
Money.localize/2
to convert a money amount into the currency in affect for the given locale.
Money version 5.11.0
Enhancements
-
Adds support for ISO 24165 Digital Tokens (crypto currency). Digital Token-based money behaves the same as currency-based money with the following exceptions due to limited data availability:
- Digital token names are not localized (there is no localised data available in CLDR)
- Digital token names are not pluralized (also because there is no localised data available)
- Digital token amounts are never rounded (there is no data available to standardise on rounding rules or the number of fractional digits to round to)
Money version 5.10.0
Enhancements
-
Add
Money.zero?/1
,Money.positive?/1
andMoney.negative?/1
. Thanks to @emaiax for the PR. -
Update CLDR to release 41 in ex_cldr version 2.28.0 and ex_cldr_numbers 2.26.0.
Money version 5.9.0
Enhancements
-
Updates to ex_cldr version 2.26.0 and ex_cldr_numbers version 2.25.0 which use atoms for locale names and rbnf locale names. This is consistent with other elements of
t:Cldr.LanguageTag
where atoms are used when the cardinality of the data is fixed and relatively small and strings where the data is free format. -
Adjusts the output of
Money.inspect/2
to be executable code. Instead of#Money<:USD, 100>
the output will beMoney.new(:USD, "100")
. This improved developer experience by allowing for copy/paste ofinspect/2
results intoiex
. It is also in line with similar changes being made inElixir
,Decimal
and others. -
Add documentation for
:currency_symbol
option forMoney.to_string/2
. Although its an option that is passed through toCldr.Number.to_string/3
, its very relevant tot:Money
formatting.
Money version 5.7.4
Bug Fixes
- Fix
Money.to_integer_exp/1
whent:Money
has a negative amount. Thanks to @hamptokr for the report and the PR.
Money version 5.7.3
Bug Fixes
- Fixes retrieving exchange rates on OTP releases before OTP 22. Thanks to @fbettag for the report, collaboration and patience.
Money version 5.7.2
Bug Fixes
- Fix spec for
Money.from_integer/3
. Thanks to @jdewar for the report.
Enhancements
- Support a
:fractional_digits
option forMoney.from_integer/3
and improve the documentation.
Money version 5.7.1
Bug Fixes
-
Fix dialyzer warnings on Elixir 1.12 and 1.13
-
Replace
use Mix.Config
withimport Config
in configuration files since the former is deprecated.
Money version 5.7.0
Note this release requires at least Elixir 1.10
Enhancements
- Updates to support CLDR release 40 via ex_cldr version 2.24
Deprecations
- Don't call deprecated
Cldr.Config.get_locale/2
, useCldr.Locale.Loader.get_locale/2
instead.