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

optionalCharacteristic being ignored in formatCurrency #473

Open
lyushenko opened this issue Apr 1, 2020 · 0 comments · May be fixed by #630
Open

optionalCharacteristic being ignored in formatCurrency #473

lyushenko opened this issue Apr 1, 2020 · 0 comments · May be fixed by #630

Comments

@lyushenko
Copy link

Issue

formatCurrency() does not respect optionalCharacteristic option and chops off leading zero before the decimal point.

See this line.

Input

numbro(-0.004).format({
  output: 'currency',
  currencySymbol: '$',
  currencyPosition: 'prefix',
  mantissa: 2,
  optionalCharacteristic: false
});

Expected output

-$0.00

Actual output

-$.00
@Shayan-P Shayan-P linked a pull request Dec 24, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant