Skip to content

Commit

Permalink
Add precision on default locale of format_number function
Browse files Browse the repository at this point in the history
and display places parameter default value
  • Loading branch information
DelazJ authored and nyalldawson committed May 17, 2021
1 parent 1af07cc commit 1fea062
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resources/function_help/json/format_number
Expand Up @@ -2,10 +2,10 @@
"name": "format_number",
"type": "function",
"groups": ["String"],
"description": "Returns a number formatted with the locale separator for thousands. Also truncates the decimal places to the number of supplied places.",
"description": "Returns a number formatted with the locale separator for thousands. By default the current QGIS user locale is used. Also truncates the decimal places to the number of supplied places.",
"arguments": [ {"arg":"number","description":"number to be formatted"},
{"arg":"places","description":"integer representing the number of decimal places to truncate the string to."},
{"arg":"language","optional":true,"description":"language (lowercase, two- or three-letter, <a href='https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes'>ISO 639 language code</a>) used to format the number into a string"}],
"examples": [ { "expression":"format_number(10000000.332,2)", "returns":"'10,000,000.33'"},
{"arg":"places","optional":true,"default":"0","description":"integer representing the number of decimal places to truncate the string to."},
{"arg":"language","optional":true,"description":"language (lowercase, two- or three-letter, <a href='https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes'>ISO 639 language code</a>) used to format the number into a string. By default the current QGIS user locale is used."}],
"examples": [ { "expression":"format_number(10000000.332,2)", "returns":"'10,000,000.33' if e.g. the current locale is an English variant"},
{ "expression":"format_number(10000000.332,2,'fr')", "returns":"'10 000 000,33'"}]
}

0 comments on commit 1fea062

Please sign in to comment.