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

Formatting negative numbers with compact: 'short' uses wrong units #805

Closed
shivijais opened this issue Mar 8, 2018 · 1 comment
Closed

Comments

@shivijais
Copy link
Contributor

shivijais commented Mar 8, 2018

Using version - '1.4.0-alpha.0'

let formatter = Globalize.numberFormatter({
    compact: short,
    maximumSignificantDigits: 3,
    minimumSignificantDigits: 1
});
formatter(-230); //-0.23K . Expected => -230
formatter(-230000); //-0.23M . Expected => -230K
formatter(-230130000); //-0.23B . Expected => -230M
formatter(-230000000000); //-0.23T . Expected => -230B
@rxaviers
Copy link
Member

rxaviers commented Mar 8, 2018

Thank you for reporting this

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

No branches or pull requests

2 participants