From aa7f5f87cfb0203f494896b9216baef4d8133552 Mon Sep 17 00:00:00 2001 From: r1cm3d <45370285+r1cm3d@users.noreply.github.com> Date: Tue, 24 May 2022 16:35:45 -0300 Subject: [PATCH] Add XOF and MGA currencies (#110) This patch adds West African CFA franc (XOF) and Malagasy ariary (MGA) currencies in order to provide them in go-money library. See also: - [West African CFA franc](https://en.wikipedia.org/wiki/West_African_CFA_franc); - [Malagasy ariary](https://en.wikipedia.org/wiki/Malagasy_ariary); Closes #109 Signed-off-by: r1cm3d --- constants.go | 2 ++ currency.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/constants.go b/constants.go index a53fc26..635d59a 100644 --- a/constants.go +++ b/constants.go @@ -96,6 +96,7 @@ const ( LYD = "LYD" MAD = "MAD" MDL = "MDL" + MGA = "MGA" MKD = "MKD" MMK = "MMK" MNT = "MNT" @@ -166,6 +167,7 @@ const ( XAU = "XAU" XCD = "XCD" XDR = "XDR" + XOF = "XOF" XPF = "XPF" YER = "YER" ZAR = "ZAR" diff --git a/currency.go b/currency.go index 2a38d2c..a2acf3f 100644 --- a/currency.go +++ b/currency.go @@ -140,6 +140,7 @@ var currencies = Currencies{ LYD: {Decimal: ".", Thousand: ",", Code: LYD, Fraction: 3, NumericCode: "434", Grapheme: ".\u062f.\u0644", Template: "1 $"}, MAD: {Decimal: ".", Thousand: ",", Code: MAD, Fraction: 2, NumericCode: "504", Grapheme: ".\u062f.\u0645", Template: "1 $"}, MDL: {Decimal: ".", Thousand: ",", Code: MDL, Fraction: 2, NumericCode: "498", Grapheme: "lei", Template: "1 $"}, + MGA: {Decimal: ".", Thousand: ",", Code: MGA, Fraction: 2, NumericCode: "969", Grapheme: "Ar", Template: "1$"}, MKD: {Decimal: ".", Thousand: ",", Code: MKD, Fraction: 2, NumericCode: "807", Grapheme: "\u0434\u0435\u043d", Template: "$1"}, MMK: {Decimal: ".", Thousand: ",", Code: MMK, Fraction: 2, NumericCode: "104", Grapheme: "K", Template: "$1"}, MNT: {Decimal: ".", Thousand: ",", Code: MNT, Fraction: 2, NumericCode: "496", Grapheme: "\u20ae", Template: "$1"}, @@ -210,6 +211,7 @@ var currencies = Currencies{ XAU: {Decimal: ".", Thousand: ",", Code: XAU, Fraction: 0, NumericCode: "959", Grapheme: "oz t", Template: "1 $"}, XCD: {Decimal: ".", Thousand: ",", Code: XCD, Fraction: 2, NumericCode: "951", Grapheme: "$", Template: "$1"}, XDR: {Decimal: ".", Thousand: ",", Code: XDR, Fraction: 0, NumericCode: "960", Grapheme: "SDR", Template: "1 $"}, + XOF: {Decimal: ".", Thousand: ",", Code: XOF, Fraction: 0, NumericCode: "952", Grapheme: "CFA", Template: "1 $"}, XPF: {Decimal: ".", Thousand: ",", Code: XPF, Fraction: 0, NumericCode: "953", Grapheme: "₣", Template: "1 $"}, YER: {Decimal: ".", Thousand: ",", Code: YER, Fraction: 2, NumericCode: "886", Grapheme: "\ufdfc", Template: "1 $"}, ZAR: {Decimal: ".", Thousand: ",", Code: ZAR, Fraction: 2, NumericCode: "710", Grapheme: "R", Template: "$1"},