Skip to content
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

Initialization with decimal #731

Open
nachogrxdev opened this issue Mar 27, 2023 · 2 comments
Open

Initialization with decimal #731

nachogrxdev opened this issue Mar 27, 2023 · 2 comments

Comments

@nachogrxdev
Copy link

nachogrxdev commented Mar 27, 2023

I have been reviewing the documentation and I have not found a way to initialize the money class with a decimal amount. Maybe I missed something, because it seems strange to me that there is no initializer for this situation.

Thank you :)

@macdonaldr93
Copy link

Yeah! +1 to this :) I love this library, but it's difficult to use it with Shopify. All of Shopify's monetary values are string decimals.

@eladchen
Copy link

eladchen commented Jul 22, 2023

v2 docs:

https://v2.dinerojs.com/docs/faq/how-can-i-create-dinero-objects-from-floats

They are outdated though...

currency.base might be a number or an array of numbers :|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants