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 have an issue when passing the same parse options to the format method, it doesn't respect the precision option. I have looked in the source code and it doesn't appear, but I want to know if this is a bug or there is a reason to have it left behind.
It looks like format only takes into account the precision of the original currency object. The only specific reason is generally currencies would keep the same precision for input/output. Is there a specific use case where you need a different precision for formatting?
I know the default precision is 2 for parsing the value but I need the formatted value for the specific currency to have precision 0 for decimals so I think it would look nicer to pass this option to the format method instead of doing separately this which could work: currency('5560.00', { precision: 0 }).format({ decimal: ',', separator: '.' })
It seems reasonable to allow currency.format() to accept similar options as the original currency function. I think precision is the only property that isn't accounted for, and there's been several requests for this. I would like to look into this soon but am also open to PRs.
Hi @scurker
I have an issue when passing the same parse options to the
format
method, it doesn't respect the precision option. I have looked in the source code and it doesn't appear, but I want to know if this is a bug or there is a reason to have it left behind.e.g.
If you need further details, please let me know, thank you for the great work!
The text was updated successfully, but these errors were encountered: