You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this should be "fixed" -- is Money supposed to be able to parse scientific notation? Maybe it just needs to be called out as not supported?
The text was updated successfully, but these errors were encountered:
I consider this a bug in our code, but I wanted to document it here, just so people are aware.
We had some code where Decimals were being represented in scientific notation, e.g.
That itself isn't a problem. The problem happens with some Money.parse code like this:
Which is effectively doing this:
So converting to a string before parsing Money is resulting in $1 when the original input was 0, or more specifically 0E+1.
Passing the Decimal directly to Money works just fine.
I'm not sure if this should be "fixed" -- is Money supposed to be able to parse scientific notation? Maybe it just needs to be called out as not supported?
The text was updated successfully, but these errors were encountered: