Conversation
|
This is becoming quite urgent |
In the meantime you can add an initializer: # frozen_string_literal: true
require "money"
caribbean_guilder = {
priority: 100,
iso_code: "XCG",
name: "Caribbean Guilder",
symbol: "Cg",
alternate_symbols: [],
subunit: "Cent",
subunit_to_unit: 100,
symbol_first: true,
html_entity: "",
decimal_mark: ",",
thousands_separator: ".",
iso_numeric: "532",
smallest_denomination: 1
}
Money::Currency.register(caribbean_guilder) |
This reverts commit 5b13aad.
| "symbol_first": true, | ||
| "html_entity": "", | ||
| "decimal_mark": ",", | ||
| "thousands_separator": ".", |
There was a problem hiding this comment.
This PR has , for decimal and . for thousands, but this PR has the opposite. I don't see anything on the linked wikipedia article or a cursory web search to clearly support either of these. Can you explain the formatting choice here?
There was a problem hiding this comment.
There's indeed not a lot documentation available. I have chosen to re-use it from ANG:
money/config/currency_iso.json
Lines 67 to 81 in e39077a
There was a problem hiding this comment.
Ah, makes sense. Thanks for clarifying!
There was a problem hiding this comment.
The Caribbean guilder is a special case because it's the official currency for two countries: Sint Maarten and Curaçao. In Sint Maarten they default to English style formatting (e.g. Cg 1,000.00) and in Curaçao they default to European style formatting (e.g. Cg 1.000,00).
An example of localised Cg formatting with Carrefour in Sint Maarten (left) and Curaçao (right):
It's probably fine to keep the configuration as is. Out of curiosity I've reached out to their Central Bank to see what they recommend as a default. While the Money (AFAIK) gem doesn't have something out of the box like Intl.NumberFormat that gives the correct format given a locale, one can still configure the formatting for this special currency programatically when working with locales.
|
Hi! I would like to know whether this patch will be released anytime soon? 😃 |
In this PR we're adding the Caribbean Guilder currency
https://en.wikipedia.org/wiki/Caribbean_guilder