- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 104
 
Description
As I was helping a friend designing a money library in javascript (dinero.js), I tried to find how non decimal currencies were solved in PHP libraries, as it's the language I'm most familiar. I ended up stumbling upon yours.
Problem is point 4 of the "Falsehoods programmers believe about prices" list.
We struggled on supporting non decimal currencies and I realised brick\money currently doesn't support them at all.
As stated here, 1 Ariary (unit) = 5 iraimbilanja (minor unit).
However brick\money gives  1 Ariary (unit) = 100 iraimbilanja (minor unit)
\Brick\Money\Money::of(1, 'MGA')->getMinorAmount(); // 100Non decimal currencies has some major implications, formatters for example won't be able to represent the whole amount in a decimal fashion.
Here's some content that could contribute to your own solution:
https://v2.dinerojs.com/docs/core-concepts/currency#currency-base
dinerojs/dinero.js#294 (comment)