Open lunaneff opened 1 year ago
+1
Just popping in to say thanks for the link
I suggest a compromise where we round left instead (what that means is up for debate)
"Rounding up for debate." Does that imply that it will round up but people will debate about whether that's a good thing?
The Swiss franc doesn't have an official symbol like the dollar or euro do, and therefore DreamBerd can't be fully used in Switzerland. This issue is of special importance, as the Swiss franc is, according to Wikipedia, the 8th most traded currency, and the first on the list without a symbol.
Because it doesn't have a symbol, it's usually written using the ISO 4217 currency code:
12.35 CHF
(CHF is sometimes also written before the value), or if it's in a context where the currency can be assumed (such as a physical store), one of these conventions is used depending on value:-.95
399.-
12.34
We also can't fully agree on the decimal separator; some places use a dot, others use a comma.
Because of this, and because it likely also applies in other countries, I suggest the following syntax for string interpolation be added:
Each of these should print the string
Hello world!
.Additionally, because smallest coin for the Swiss franc is worth 0.05 CHF, I'd suggest rounding the value to a multiple of 0.05 if the value is a float. Because I doubt we could agree on whether to round away from 0, towards 0, or to the nearest multiple, I suggest a compromise where we round left instead (what that means is up for debate).
For the implementation in #74, the full, up-to-date list of ISO 4217 currencies can be found at https://www.six-group.com/en/products-services/financial-information/data-standards.html, in both Excel and XML formats.