Dinero.to_float/1
added
DineroWithCurrency.cast/1
now supportsDinero
struct- support for Jason.Encoder for Ecto embeds
Dinero.parse!/2
addedDinero.parse/2
now conforms to Elixir conventions and returns either{:ok, %Dinero{}}
or:error
DineroWithCurrency.cast/1
now supportsString
,integer
andfloat
- parsing Strings like
"1,235,837.50"
- default currency for
Dinero.new/2
added (:USD
)
Dinero.equals?/2
andDinero.zero?/1
added
- Ability to create
Dinero
struct from String added. SeeDinero.parse/2
- Ability to create
Dinero
struct from scientific notation
- Convertation fixed
- Default currency for sigil is USD
String.Chars
implemented and nowDinero
can be used as an argument forto_string/1
- Now it contains 2 methods
Dinero.multiply/2
andDinero.multiply/3
for truncations and rounding up results of multiplying - Now there are
Dinero.divide/2
andDinero.divide/3
for truncations and rounding up results of dividing - Small docs fixes
- Ability to add/subtract int or float values removed. Now
Dinero.add/2
andDinero.subtract/2
use onlyDinero
structs for calculations
- Initial Release