Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
RedShift1
· 2y ago · 0 comments
That seems super dumb indeed. I really wish JSON had an actual decimal type, we already have valid "e" notation (like 10e2), why not have a "d" notation, like 5d3 (meaning 5.3) or 5.3d.
Comments
[–]
wiktor-k
2y ago
Yes! Something similar to
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
[–]
svapnil
2y ago
All amounts in this library are in base units (whole numbers) and no arithmetic is used!
For financial calculations I recommend using Dinero.js
[–]
RedShift1
OP
2y ago
So 1 euro is written as 100?