News for hackers. Stuff that matters.
Re:Dinero.js – JavaScript library for working with monetary ... by MehdiEG on Monday April 16, 2018 @05:19PM (#16852894)
By "cents", you really mean "minor currency unit" I assume?

In British Pounds, it would be pennies for example.

The doc doesn't explain how the library deals with the various different minor units out there (I've been bitten too many times by code that assumes that all currencies have a minor unit and that 100 minor units = 1 major unit so I'm careful these days).

For example, what about currencies that have a minor unit that's not effectively used in practice or that don't have a minor unit at all (e.g. JPY)? Are the amount supposed to be expressed in this unused / non-existent minor unit?

What happens with currencies that use a subdivision other than 100 for their minor unit (e.g. KWD)? Will the calculations and formatting be correct?

Re:Dinero.js – JavaScript library for working with monetary ... by sharpercoder on Monday April 16, 2018 @08:48PM (#16854422)
A cent is a minor currency unit; think procent, aka hundred in latin, or used in common international form one-hundreth.
Re:Dinero.js – JavaScript library for working with monetary ... by ricardobeat on Monday April 16, 2018 @09:44PM (#16854724)
The Kuwaiti Dinar (KWD) the parent mentioned is subdivided into 1000s, not 100s.