globalizejs / globalizejs/globalize

Format a number without truncating decimal digits

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

Description

Hello,

I have an issue with the number and currency formatter. I have some numbers that can have many decimal digits (from 2 to 5 (and maybe even more in the future)).

How can I tell the formatter that I only want the number formatted without touching the decimal digits ?

Ex:

``` js
Globalize.formatNumber(0.00398)
Expected: 0,00398
Current: 0,004
Globalize.formatNumber(0.0039)
Expected: 0,0039
Current: 0,004
Globalize.formatNumber(1000.00398)
Expected: 1 000,00398
Current: 1 000,004
```

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.