We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If you need to access the underlying value in cents (for instance to persist to a database or use in an API call), currently you need to use:
currency(valueInDollars).intValue;
It would be slightly more clear to be able to use:
currency(valueInDollars).inCents();
Not sure if inCents() is the best naming; could also consider toCentValue(), centValue(), valueInCents(), etc
inCents()
toCentValue()
centValue()
valueInCents()
The text was updated successfully, but these errors were encountered:
'subUnits' might be better to help remove api references to the US dollar/cents.
Sorry, something went wrong.
How about currency(valueInMajorUnits).minorUnits?
currency(valueInMajorUnits).minorUnits
If you had a precision > 2, then currency(valueInDollars).intValue would not equal cents either.
precision
currency(valueInDollars).intValue
No branches or pull requests
If you need to access the underlying value in cents (for instance to persist to a database or use in an API call), currently you need to use:
It would be slightly more clear to be able to use:
Not sure if
inCents()
is the best naming; could also considertoCentValue()
,centValue()
,valueInCents()
, etcThe text was updated successfully, but these errors were encountered: