-
Notifications
You must be signed in to change notification settings - Fork 140
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
Precision with fromCents results in incorrect values #318
Comments
Additionally, I would have also expected to be able to add decimal amounts to cents:
Which would yield: |
This is expected behavior. currency(1, { fromCents: true }) // => $0.01
currency(123, { fromCents: true }) // => $1.23
currency(123, { fromCents: true, precision: 3 }) // => $0.123 |
In that case, I'd suggest that the name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @scurker
I'm using
fromCents
with aprecison
option and I'm getting unexpected results:I would have expected
$1.2300
.Thanks,
Matt
The text was updated successfully, but these errors were encountered: