Skip to content

Fix MGA (Malagasy Ariary) to be a zero-decimal currency#1127

Merged
cade merged 1 commit intoRubyMoney:mainfrom
mapreal19:fix-mga-zero-decimal-currency
May 9, 2025
Merged

Fix MGA (Malagasy Ariary) to be a zero-decimal currency#1127
cade merged 1 commit intoRubyMoney:mainfrom
mapreal19:fix-mga-zero-decimal-currency

Conversation

@mapreal19
Copy link
Contributor

According to Stripe's documentation (https://docs.stripe.com/currencies#zero-decimal), MGA is included in their list of zero-decimal currencies, and this change ensures the Money gem correctly formats MGA amounts without decimal places.

Also from the Wikipedia entry:

It is notionally subdivided into 5 iraimbilanja and is one of only two non-decimal currencies currently circulating (the other is the Mauritanian ouguiya). The names ariary and iraimbilanja derive from the pre-colonial currency, with ariary (from the Spanish word "real") being the name for a silver dollar. Iraimbilanja means "one iron weight" and was the name of an old coin worth 1⁄5 of an ariary. However, as of May 2023, the unit is effectively obsolete since the iraimbilanja has practically no purchasing power, and the coins have fallen into disuse.

@mapreal19 mapreal19 marked this pull request as ready for review May 4, 2025 10:59
@mapreal19
Copy link
Contributor Author

@cade can you check this one out? Thoughts?

Copy link
Contributor

@cade cade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Thanks for the Stripe/Wikipedia links!

@cade cade merged commit d203bd9 into RubyMoney:main May 9, 2025
5 checks passed
@mapreal19
Copy link
Contributor Author

@cade thanks!

@mapreal19 mapreal19 deleted the fix-mga-zero-decimal-currency branch May 9, 2025 14:40
@RemyDuijkeren
Copy link

Where is the proof that since May 2023, the 1/5 unit is effectively obsolete?

According to ISO-4217 it is still valid. The fact that Stripe treats it as a zero-decimal currency should not trigger this change? Wiki mention it but without any reference.

@mapreal19
Copy link
Contributor Author

@RemyDuijkeren true that wiki entry doesn't have a proper reference. Should we revert this change then? I couldn't find any other reliable information about this

@RemyDuijkeren
Copy link

@mapreal19 I don't use RubyMoney so I can't say anything about which direction to take (I maintain the .NET counterpart, so there for my interest in RubyMoney).

I also couldn't find any reliable information about this, so I personally lean more on what ISO is saying.

@mapreal19
Copy link
Contributor Author

@cade what's your opinion on this?

@cade
Copy link
Contributor

cade commented May 15, 2025

Firstly, I absolutely do not consider myself the final source of truth for the RubyMoney gem's formatting decisions. I have also experienced first hand situations where lagging ISO standard updates in other areas cause real bugs/errors/pain.

That said, I tried to go down the Wikipedia article's edit history rabbit hole. There's an edit at least as far back as 2021 claiming that the iraimbilanja is "effectively obsolete." I have no first-hand experience with this currency, and cannot confidently attest to the truth of this claim. However, I do generally trust Wikipedia references for currency details, even if there's not extensive citations.

I have no horse in this race, but I'm inclined to personally lean into seemingly real-world usage (as it appears Stripe has done) over dying on the ISO hill until the standard is updated. That said, if anyone else disagrees and reverts this, I will have zero objections. 🤷

@RemyDuijkeren
Copy link

RemyDuijkeren commented May 24, 2025

My personal experience is that when people talk about 'this is not being used anymore' they often talk about cash transactions. Like the 1- and 2-cent EUR in The Netherlands.

But the fact that Stripe is not doing it for financial transactions is a strong indicator that maybe it is really not used overall anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants