borgar / numfmt

Full ECMA-376 number and date formatting in JavaScript
40 stars 9 forks source link

Custom format `#.###0` not working #18

Closed dantronik-bugreporting closed 2 years ago

dantronik-bugreporting commented 2 years ago

According to https://customformats.com/, when I enter #.###0 as custom format, for example: -10.29 should be formatted as -10.290

However:

numfmt.format("#.###0", -10.29)
'-10.29'
dantronik-bugreporting commented 2 years ago

My local Excel version displays the number as -10.290 as well. (or rather -10,290 in the German version).

borgar commented 2 years ago

Yep. This is clearly an error. Will take a look asap.