Numeral-js icon indicating copy to clipboard operation
Numeral-js copied to clipboard

NaN Formatting

Open zortext opened this issue 5 years ago • 3 comments

BUG: Please follow the steps;

var n=numeral(103.15 - 203.48 + 100.33); // returns a {_input: 1.4210854715202004e-14, _value: 1.4210854715202004e-14}

n.format("0,0.00"); // returns NaN

zortext avatar May 25 '20 12:05 zortext

It seems that it cannot format exponential numbers (in JS by default from 0.0000001 = e-7).

janabalkovicova avatar Jun 05 '20 11:06 janabalkovicova

Same bug numeral(1e-15).format('0') // returns NaN

TimePerformance avatar Jul 20 '20 12:07 TimePerformance

I downgraded to 2.0.4

isaacsanders avatar Aug 21 '20 21:08 isaacsanders