Changelog for Money v3.2.2

This is the changelog for Money v3.2.2 released on February 10th, 2019. For older changelogs please consult the release tag on GitHub

Enhancements

  • Improves parsing of money strings. Parsing now uses various strings that CLDR knows about. Some examples:
  iex> Money.parse "$au 12 346", locale: "fr"
  #Money<:AUD, 12346>
  iex> Money.parse "12 346 dollar australien", locale: "fr"
  #Money<:AUD, 12346>
  iex> Money.parse "A$ 12346", locale: "en"
  #Money<:AUD, 12346>
  iex> Money.parse "australian dollar 12346.45", locale: "en"
  #Money<:AUD, 12346.45>
  iex> Money.parse "AU$ 12346,45", locale: "de"
  #Money<:AUD, 12346.45>

  # Can also return the strings available for a given currency
  # and locale
  iex> Cldr.Currency.strings_for_currency :AUD, "de"
  ["aud", "au$", "australischer dollar", "australische dollar"]

  # Round trip formatting also seems to be ok
  iex> {:ok, string} = Cldr.Number.to_string 1234, Money.Cldr, currency: :AUD
  {:ok, "A$1,234.00"}
  iex> Money.parse string
  #Money<:AUD, 1234.00>

Changelog for Money v3.2.1

This is the changelog for Money v3.2.1 released on February 2nd, 2019. For older changelogs please consult the release tag on GitHub

Bug Fixes

Changelog for Money v3.2.0

This is the changelog for Money v3.2.0 released on February 1st, 2019. For older changelogs please consult the release tag on GitHub

Bug Fixes

  • Correctly generate migrations_path/1 function based upon whether Ecto is configured and which version

Enhancements

  • Adds Money.parse/2 which will parse a string comprising a currency code and an amount. It will return a Money.t or an error. This function may be helpful in supporting money input in HTML forms.

Changelog for Money v3.1.0

This is the changelog for Money v3.1.0 released on December 30th, 2018. For older changelogs please consult the release tag on GitHub

Bug Fixes

  • Fix typo in exchange_rates_retriever.ex. Thanks to @lostkobrakai. Closes #91.

  • Remove obsolete cldr compiler

  • Changes the sum aggregate function for money_with_currency to be STRICT which means it handles NULL columns in the same way as the standard SUM function. Thanks to @lostkobrakai. Closes #88.

  • Fixes documentation link errors

  • Fix unhandled terminate typo error in exchange rates server. Thanks to @xavier. Closes #90.

Changelog for Money v3.0.0

This is the changelog for Money v3.0.0 released on November 23rd, 2018. For older changelogs please consult the release tag on GitHub

The primary purpose of this release is to support ex_cldr version 2.0

Breaking changes

  • Money.from_tuple/1 has been removed
  • Uses ex_cldr version 2. Please see the changelog for configuration changes that are required.
  • Requires a default_cldr_backend to be configured in config.exs. For example:
  config :ex_money,
    ...
    default_cldr_backend: MyApp.Cldr
  end