Releases: kipcole9/money
Ex Money version 5.21.0
Enhancements
- Add
JSON.Encoder
implementation to support serializing money types with Elixir's JSON module. Thanks to @jfpedroza for the PR. Closes #182.
Ex Money version 5.20.0
Soft Deprecation
- The option
:fractional_digits
forMoney.from_integer/3
has been deprecated in favour of:currency_digits
for consistency withMoney.round/2
and functions in ex_cldr_numbers.:fractional_digits
will continue to be supported for an indefinite period.
Bug Fixes
-
Ensure
Money.split/3
always returns a remainder that is greater than or equal to 0. Thanks to @jdewar for the report and @coladarci, @Wigny for their collaboration. Closes #173. -
Allow a non-breaking-space to be part of a number string. Some locales (like
en-ZA
) will format numbers with a nbsp when using standard separators for that locale. -
Fix documentation for
Money.ExchangeRates
replacing:exchange_rate_service
with:auto_start_exchange_rate_service
. Thanks to @cw789 for the PR. Closes #174.
Enhancements
-
Update to CLDR 47 data including update to ISO 4217 currency information.
-
Support passing rounding options to
Money.split/3
.
Ex Money version 5.19.2
Bug Fixes
-
Fix using Elixir 1.18's JSON module in
ex_money
(specifically decoding exchange rates). Thanks to @allenwyma and @maikelthedev for the report. Closes #176. -
Document
currency_symbol: :none
option forMoney.to_string/2
. This option formats the money amount without a currency symbol. This may be useful for UI forms that separate the currency and the amount for input. Requires ex_cldr_numbers version 2.33.6 or later. -
Fix parsing money strings that contain trailing RTL markers. Requires ex_cldr_currencies version 2.16.4 or later.
Ex Money version 5.19.1
Bux Fixes
- Fixes
Money.within/3
whenmin
andmax
are the same. Thanks to @joewunderlich for the report. Closes #177.
Ex Money version 5.19.0
Deprecations
Money.default_backend/0
is soft deprecated in favor ofMoney.default_backend!/0
whose naming better expresses the side effect of an exception being raised if no default backend is configured.
Bug Fixes
- Surface an error exception if, when starting the exchange rates service, no
Money.default_backend!/0
is configured.
Ex Money version 5.18.0
Enhancements
- Adds
min/2
,max/2
,min!/2
,max!/2
,clamp/3
,clamp!/3
,negate/1
,negate!/1
andwithin?/3
.
Ex Money version 5.17.2
Bug Fixes
- Fix implementation of
Money.exclude_protocol_implementation/1
forJason.Encoder
. Thanks to @wkirschbaum for the PR. Closes #171.
Enhancements
- Add
Money.exclude_protocol_implementation/1
forString.Chars
. Thanks to @wkirschbaum for the PR. Closes #172.
Ex_money version 5.17.1
Bug Fixes
-
Update
poison
optional dependency to allow~> 6.0
. -
Update
stream_data
test dependency to~> 1.0
.
Enhancements
- Improve specs and broaden dialyzer configuration.
Money version 5.17.0
Bug Fixes
-
Fixes warnings on Elixir 1.17.
-
Requires Elixir 1.12 or later.
Money version 5.16.0
Bug Fixes
-
When parsing numbers, use the localized number system separators where they exist. Thanks to @pshoukry for the report. Closes #167.
-
Surface errors when starting the exchange rates retrieveer. Thanks to @danschultzer for the PR. Closes #165.
Enhancements
-
Update to CLDR 45.0 data.
-
Return structured errors for
Money.ExchangeRates.latest_rates/0
,Money.ExchangeRates.historic_rates/1
,Money.ExchangeRates.last_updated/0
andMoney.ExchangeRates.latest_rates_available?/0
when the exchange rates retrieval process is not running.