Skip to content

Commit

Permalink
Add XOF and MGA currencies (#110)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
r1cm3d authored May 24, 2022
1 parent affffaf commit aa7f5f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const (
LYD = "LYD"
MAD = "MAD"
MDL = "MDL"
MGA = "MGA"
MKD = "MKD"
MMK = "MMK"
MNT = "MNT"
Expand Down Expand Up @@ -166,6 +167,7 @@ const (
XAU = "XAU"
XCD = "XCD"
XDR = "XDR"
XOF = "XOF"
XPF = "XPF"
YER = "YER"
ZAR = "ZAR"
Expand Down
2 changes: 2 additions & 0 deletions currency.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down Expand Up @@ -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"},
Expand Down

0 comments on commit aa7f5f8

Please sign in to comment.