elixirmoney / money

Elixir library for working with Money safer, easier, and fun... Is an interpretation of the Fowler's Money pattern in fun.prog.
https://hex.pm/packages/money/
MIT License
826 stars 139 forks source link

Parsing string #188

Open OiTAvO opened 2 years ago

OiTAvO commented 2 years ago

If "5.0e3" is an invalid string, shouldn't it return :error?

iex(1)> Money.parse("5.0e3") 

{:ok, %Money{amount: 503, currency: :BRL}}

or

If "5.0e3" is a valid string, shouldn't the return be: {:ok, %Money{amount: 500000, currency: :BRL}}

Nitrino commented 1 year ago

I reopened this issue because this feature was moved to v2.0 due to breaking changes