Skip to content

Commit

Permalink
Clarify "precision" in currency format functions
Browse files Browse the repository at this point in the history
The documentation of the FormatAccounting and FormatCurrency
functions could be clearer in terms of how the precision param
works. This commit makes it more explicit that adding a precision
of < 2 will not format the return values to include fewer decimals.

Resolves gohugoio#8858
  • Loading branch information
ptgott committed Sep 2, 2021
1 parent 3256928 commit f712606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/data/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3903,7 +3903,7 @@
},
"lang": {
"FormatAccounting": {
"Description": "FormatAccounting returns the currency reprecentation of number for the given currency and precision\nfor the current language in accounting notation.",
"Description": "FormatAccounting returns the currency representation of number for the given currency and precision\nfor the current language in accounting notation.\n\nThe return value is formatted with at least two decimal places.",
"Args": [
"precision",
"currency",
Expand All @@ -3918,7 +3918,7 @@
]
},
"FormatCurrency": {
"Description": "FormatCurrency returns the currency reprecentation of number for the given currency and precision\nfor the current language.",
"Description": "FormatCurrency returns the currency representation of number for the given currency and precision\nfor the current language.\n\nThe return value is formatted with at least two decimal places.",
"Args": [
"precision",
"currency",
Expand Down

0 comments on commit f712606

Please sign in to comment.