Template:Format price/doc: Difference between revisions
No edit summary |
Pragmatist (talk | contribs) m 1 revision imported |
(No difference)
| |
Latest revision as of 18:29, 8 May 2025
Lua error: Internal error: The interpreter has terminated with signal "11".
Lua error: Internal error: The interpreter has terminated with signal "11".
This template displays numbers typically representing prices in a pleasant way, ideally suited for articles. Numbers one thousand or greater are reduced down and rounded to a total of three digits followed by a multiplier text, and smaller numbers receive separators and exactly two digits to represent cents, which does not always happen with the {{formatnum:}} magic word.
Usage
Lua error: Internal error: The interpreter has terminated with signal "11".
Where:
- value: the value that will be formatted and displayed (required).
- digits: sets the digit in which a value lower than one thousand must be rounded, defaulting to "2" (cents) if unspecified.
Providing non-numeric parameters, failing to provide any parameter, or providing a negative value parameter, result all in a link to the NaN article. Despite its name, this template only handles the number-formatting, not any unit symbols – consider {{currency}} for that separate feature.
Examples
Lua error: Internal error: The interpreter has terminated with signal "11". = 1.20
Lua error: Internal error: The interpreter has terminated with signal "11". = 456.79
Lua error: Internal error: The interpreter has terminated with signal "11". = 456.80
Lua error: Internal error: The interpreter has terminated with signal "11". = 457
Lua error: Internal error: The interpreter has terminated with signal "11". = 500
$Lua error: Internal error: The interpreter has terminated with signal "11".= $1,234
$Lua error: Internal error: The interpreter has terminated with signal "11".= $12,345
$Lua error: Internal error: The interpreter has terminated with signal "11".= $123,456
$Lua error: Internal error: The interpreter has terminated with signal "11".= $1 million
¥Lua error: Internal error: The interpreter has terminated with signal "11".= ¥98.8 trillion
Lua error: Internal error: The interpreter has terminated with signal "11". atoms= 78.6 septillion atoms
Wrong
Lua error: Internal error: The interpreter has terminated with signal "11". = Lua error: Internal error: The interpreter has terminated with signal "11". (empty parameter)
Lua error: Internal error: The interpreter has terminated with signal "11". = Lua error: Internal error: The interpreter has terminated with signal "11". (empty first parameter)
Lua error: Internal error: The interpreter has terminated with signal "11". = Lua error: Internal error: The interpreter has terminated with signal "11". (negative values are invalid)
Lua error: Internal error: The interpreter has terminated with signal "11". = Lua error: Internal error: The interpreter has terminated with signal "11". (only numeric values are allowed)
Lua error: Internal error: The interpreter has terminated with signal "11". = Lua error: Internal error: The interpreter has terminated with signal "11". (overflow)
See also
- {{Inflation}}
- {{Inflation/fn}}
- {{currency}}
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| value | 1 | the value that will be formatted and displayed
| Number | required |
| digits | 2 | sets the digit in which a value lower than one thousand must be rounded, defaulting to "2" (cents) if unspecified | Number | suggested |
