Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add VES currency #139

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const (
UYU = "UYU"
UZS = "UZS"
VEF = "VEF"
VES = "VES"
VND = "VND"
VUV = "VUV"
WST = "WST"
Expand Down
1 change: 1 addition & 0 deletions currency.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ var currencies = Currencies{
UYU: {Decimal: ".", Thousand: ",", Code: UYU, Fraction: 2, NumericCode: "858", Grapheme: "$U", Template: "$1"},
UZS: {Decimal: ".", Thousand: ",", Code: UZS, Fraction: 2, NumericCode: "860", Grapheme: "so\u2019m", Template: "$1"},
VEF: {Decimal: ".", Thousand: ",", Code: VEF, Fraction: 2, NumericCode: "928", Grapheme: "Bs", Template: "$1"},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this currency has the wrong numeric code, which would make it fail in case the function CurrencyByNumericCode is used, because it has the same value as the newly added VES currency.

func (c Currencies) CurrencyByNumericCode(code string) *Currency {

The correct value for VEF is 937 according to https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-three.xml (https://www.six-group.com/en/products-services/financial-information/data-standards.html)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'm changing that on the PR.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sk-!

VES: {Decimal: ".", Thousand: ",", Code: VES, Fraction: 2, NumericCode: "928", Grapheme: "Bs.S", Template: "$1"},
VND: {Decimal: ".", Thousand: ",", Code: VND, Fraction: 0, NumericCode: "704", Grapheme: "\u20ab", Template: "1 $"},
VUV: {Decimal: ".", Thousand: ",", Code: VUV, Fraction: 0, NumericCode: "548", Grapheme: "Vt", Template: "$1"},
WST: {Decimal: ".", Thousand: ",", Code: WST, Fraction: 2, NumericCode: "882", Grapheme: "T", Template: "1 $"},
Expand Down