maybe-finance / maybe

The OS for your personal finances
https://maybe.co
GNU Affero General Public License v3.0
29.53k stars 2.25k forks source link

Allow user to select separator and delimiter convention for EUR currency #1154

Open zachgoll opened 2 weeks ago

zachgoll commented 2 weeks ago

Discussed in https://github.com/maybe-finance/maybe/discussions/1093

Originally posted by **825i** August 15, 2024 ### Describe the feature In most areas of the world numbers are written like so: 2,312.25 Not: 2.312,25 That is, comma first, period second. There should be at the very least an option to reverse the placement. Further reasoning for this is that my debts to me looks like I only owe €25.32 cents. Not €25,325... ![image](https://github.com/user-attachments/assets/5de0d162-9acf-449b-baf9-343c9b6f14cb) ### Why is this feature important? There is the possibility of misunderstanding balances. ### Additional context, screenshots, and relevant links Comma and period should be replaced eg. in the case of all these amounts. ![Screenshot from 2024-08-15 10-02-27](https://github.com/user-attachments/assets/822dc8d4-0647-466c-a110-7e1d824f2076)
zachgoll commented 2 weeks ago

What currently controls the placement of the separator/delimiter is the currencies file. By default, this will show a value such as €25.000,50.

https://github.com/maybe-finance/maybe/blob/ee572d8d1f51a818f2bd48df1b60c2dd53c79fc0/config/currencies.yml#L15-L28

Would be curious to hear from folks using EUR, which countries predominantly view EUR with , as the thousands delimiter? (i.e. €25,000.50)

From what I've seen, the predominant way is €25.000,50?

tonyvince commented 1 week ago

Which countries predominantly view EUR with, as the thousands delimiter? (i.e. €25,000.50)

Ireland, Cyprus, and Malta use , as a thousand separator and . as a decimal separator like the rest of the (sane) world.

From what I've seen, the predominant way is €25.000,50?

Yes.

gariasf commented 1 week ago

Which countries predominantly view EUR with, as the thousands delimiter? (i.e. €25,000.50)

In Spain, local banks and other financial platforms generally use , as a decimal separator and . as the thousand separator. With that said, plenty of other foreign platforms still use the other approach. The formats are often mixed in documents related to the same thing. For example, the credit card receipt might be in one format and the actual receipt for the same purchase is sometimes displayed in the other format. It depends on the billing tools and platforms.

What matters is the precision of the decimal amount. It is rarely seen with more than two digits, perhaps except for crypto, and I would say that's where the confusion comes from. Normally, a thousand separator is displayed once we reach 4 digits, three of them after the separator, whichever it is. Hence, the confusion when seeing three decimal numbers on the decimal part. I'd say that if we can only display the decimals rounded to two digits of precision everywhere sensible, this topic would become a non issue. Otherwise, if it were necessary, a legend, or format indication should be shown.

My take: Trying to account for this should not be relevant before a stable release. Moreover, it might also add unnecessary complexity and friction for other features. I'd leave it for polishing at a later stage if ever needed.

zachgoll commented 1 day ago

@gariasf thanks for the detail! So we do have a currencies file that gives us a default precision:

https://github.com/maybe-finance/maybe/blob/730e58d763b223cc5c21a9ebb464274be3c819a3/config/currencies.yml#L14

This takes care of formatting the correct number of decimals.

That said, I agree that this is "polish" that will likely be deferred until after we get the hosted app up and running (although open to contributions!)