Improve Serbian Dinar formatting#1124
Merged
yukideluxe merged 5 commits intoRubyMoney:mainfrom Jul 9, 2025
Merged
Conversation
sunny
reviewed
Jun 26, 2025
Member
sunny
left a comment
There was a problem hiding this comment.
Can you add a small entry to the Changelog as well? 🙏🏻
Contributor
Author
|
@sunny sure, done |
sunny
approved these changes
Jun 26, 2025
Member
|
@s-mage if you resolve the conflicts we can get this sorted out 😊 |
Contributor
Author
|
@yukideluxe sure thing, done now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey, thanks for the gem!
I noticed that you want to move to the formatting based on locale by default, and it's a good thing. You still want to support formatting based on the currency, so I thought I'd fix that for RSD.
So, basically the currency formatting is number formatting, currency symbol, and if we want to put the symbol before or after the currency.
Number formatting guidelines are easy to find. Two from the first page of google:
This gives us decimal mark
,and separator.(though spaceis a valid separator as well).The internet agrees that the symbol should be placed after the number:
As for the symbol, I couldn't be sure and had to find an authority. Found two, Unicode CLDR (that ECMA 402 spec for internationalization API mentions) and my Serbian teacher Borislava who is also a philologist. I also wrote an email to the Institute or Serbian Language, but it's protesting at the moment and won't reply. What's better, Borislava and Unicode agree that your best bet on the symbol is
RSD. If the rest of the text is in Serbian and is cyrillic, you will probably be better off usingРСДbut RSD is still fine since it's also the ISO code, whileРСДin latin is wrong.There is also the amount of digits after the decimal mark. It's correct here and incorrect in the Unicode repo. I wrote to People's bank of Serbia to be sure, they replied (for a change) and yes, there are no coins for Para but they are still used for cashless operations.
All in all, RSD currency-based formatting should be
This PR changes the
currency_isodataset to make it so.Thanks!