-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unformat not respecting settings #175
Comments
As a temporary fix I do: unformat(text.replace(",",".")) |
I'm also from Brazil and had the same issue. I was about to try to fix the issue myself, debugging the unminified version of the library but, it turns out that the unminified version works just fine! The dev must check the provided minified version for download, it seems to be outdated. While this doesn't happen, we can just grab the unminified version, add to our projects and run some minification process ourselves. |
We just ran into this issue and the solution @fauresco is proposing is the way to go for the time being. The Looks like the minified and non-minified files have diverged quite a bit, I see updated 2 years ago vs 6 months ago in the commit history. |
We ran into the same issue and are proposing this solution: #183 |
I'm brazilian, here in Brazil we use "," as decimal separator, "." as thousand separator and "R$" as currency symbol.
I have some text input with formatted input, like "R$ 123,45", then I call unformat(text) to set the (double) value and the result as expected would be (doube) 123.45, but the actual result is (double) 12345.
The accounting.settings is:
accounting.settings = {
currency: {
symbol : "R$",
format: "%s%v",
decimal : ",",
thousand: ".",
precision : 2
},
number: {
precision : 0,
thousand: ".",
decimal : ","
}
}
The text was updated successfully, but these errors were encountered: