Posted 7 July 2021, 5:03 pm EST
In doc, Globalize.formatNumber specify it follow .NET standard number format.
I found some difference with the g specification using wijmo 5.20211.794
- The default number of precision is 2 instead of 15
expect(Globalize.formatNumber(0.453,"g")).toBe("0.453"); //display 0.45 instead
- Precision specifier: Number of significant digits.
expect(Globalize.formatNumber(0.000453,"g2")).toBe("0.00045"); //display 0 instead
Are you following the .Net spec exactly or the difference are intentional?