globalizejs / globalizejs/globalize

Number formats value as "-0" when rounding.

Open
#766 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.8k
Forks
585
PR merge metrics
No merged PRs in 30d

Description

If the number is negative and rounds down to 0, the formatting is keeping the negative symbol.

```js
Globalize.formatNumber(-0.25, { minimumFractionDigits: 0, maximumFractionDigits: 0 })

// yields "-0"

// expect "0"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.