-
Notifications
You must be signed in to change notification settings - Fork 144
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
Added proper formatting for different currencies. #89
base: master
Are you sure you want to change the base?
Conversation
+1 |
As a library user, I think that is a great improvement to the library but I believe it is missing tests covering the changes. |
DJF: {Decimal: ".", Thousand: ",", Code: DJF, Fraction: 0, NumericCode: "262", Grapheme: "Fdj", Template: "1 $"}, | ||
DKK: {Decimal: ",", Thousand: ".", Code: DKK, Fraction: 2, NumericCode: "208", Grapheme: "kr", Template: "$ 1"}, | ||
DKK: {Decimal: ",", Thousand: ",", Code: DKK, Fraction: 2, NumericCode: "208", Grapheme: "kr", Template: "$ 1"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reference document (https://www.edufukunari.com.br/en/world-currency-formats-iso-4217-information/) says "#.###,##" for DKK (dot for thousands)
@@ -106,7 +106,7 @@ var currencies = map[string]*Currency{ | |||
LKR: {Decimal: ".", Thousand: ",", Code: LKR, Fraction: 2, NumericCode: "144", Grapheme: "\u20a8", Template: "$1"}, | |||
LRD: {Decimal: ".", Thousand: ",", Code: LRD, Fraction: 2, NumericCode: "430", Grapheme: "$", Template: "$1"}, | |||
LSL: {Decimal: ".", Thousand: ",", Code: LSL, Fraction: 2, NumericCode: "426", Grapheme: "L", Template: "$1"}, | |||
LTL: {Decimal: ".", Thousand: ",", Code: LTL, Fraction: 2, NumericCode: "", Grapheme: "Lt", Template: "$1"}, | |||
LTL: {Decimal: ",", Thousand: ".", Code: LTL, Fraction: 2, NumericCode: "", Grapheme: "Lt", Template: "$1"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The referenced document says: "# ###,##" for LTL
https://www.edufukunari.com.br/en/world-currency-formats-iso-4217-information/
@@ -133,10 +133,10 @@ var currencies = map[string]*Currency{ | |||
PGK: {Decimal: ".", Thousand: ",", Code: PGK, Fraction: 2, NumericCode: "598", Grapheme: "K", Template: "1 $"}, | |||
PHP: {Decimal: ".", Thousand: ",", Code: PHP, Fraction: 2, NumericCode: "608", Grapheme: "\u20b1", Template: "$1"}, | |||
PKR: {Decimal: ".", Thousand: ",", Code: PKR, Fraction: 2, NumericCode: "586", Grapheme: "\u20a8", Template: "$1"}, | |||
PLN: {Decimal: ".", Thousand: ",", Code: PLN, Fraction: 2, NumericCode: "985", Grapheme: "z\u0142", Template: "1 $"}, | |||
PLN: {Decimal: ",", Thousand: ".", Code: PLN, Fraction: 2, NumericCode: "985", Grapheme: "z\u0142", Template: "1 $"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referenced document says "# ###,##" for PLN. Space for thousand.
@@ -145,7 +145,7 @@ var currencies = map[string]*Currency{ | |||
SBD: {Decimal: ".", Thousand: ",", Code: SBD, Fraction: 2, NumericCode: "090", Grapheme: "$", Template: "$1"}, | |||
SCR: {Decimal: ".", Thousand: ",", Code: SCR, Fraction: 2, NumericCode: "690", Grapheme: "\u20a8", Template: "$1"}, | |||
SDG: {Decimal: ".", Thousand: ",", Code: SDG, Fraction: 2, NumericCode: "938", Grapheme: "\u00a3", Template: "$1"}, | |||
SEK: {Decimal: ".", Thousand: ",", Code: SEK, Fraction: 2, NumericCode: "752", Grapheme: "kr", Template: "1 $"}, | |||
SEK: {Decimal: ",", Thousand: ".", Code: SEK, Fraction: 2, NumericCode: "752", Grapheme: "kr", Template: "1 $"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referenced document says "# ###,##" for SEK. Space for thousand.
Also described in https://www.freeformatter.com/sweden-standards-code-snippets.html
CHF: The thousands- separator should be an apostroph ' not a comma , see eg.
http://www.thefinancials.com/Default.aspx?SubSectionID=curformat
SEK: The decimal should be a comma , and thousand should be a dot .
https://www.edufukunari.com.br/en/world-currency-formats-iso-4217-information/
http://www.thefinancials.com/Default.aspx?SubSectionID=curformat
CZK: The decimal should be a comma , and thousand should be a dot .
https://www.edufukunari.com.br/en/world-currency-formats-iso-4217-information/
LTL: The decimal should be a comma , and thousand should be a dot .
https://www.edufukunari.com.br/en/world-currency-formats-iso-4217-information/
NOK: The decimal should be a comma , and thousand should be a dot .
https://www.edufukunari.com.br/en/world-currency-formats-iso-4217-information/
PLN: The decimal should be a comma , and thousand should be a dot .
https://www.edufukunari.com.br/en/world-currency-formats-iso-4217-information/
DKK: The decimal should be a comma , and thousand should be a comma ,
https://www.edufukunari.com.br/en/world-currency-formats-iso-4217-information/
RON: The decimal should be a comma , and thousand should be a dot .
https://www.edufukunari.com.br/en/world-currency-formats-iso-4217-information/