Reputation: 2892
I am using react-intl
for formatting number based on locale.
For cs
locale,
this.props.intl.formatNumber(-0.0001)
is returning -0
. I want library to return -0,0001
. So, i don't want to round number.
How can i achieve this.
Upvotes: 0
Views: 847
Reputation: 627
you need to specify minimumFractionDigits
: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat
Upvotes: 1