Template:Signed number
Jump to navigation
Jump to search
Documentation The documentation below is transcluded from Template:Signed number/doc. (edit | history)
[purge]
See also: Template:Sign
This simple helper template adds a sign (plus +
or minus −
) to a number input. It applies {{formatnum:}}
to the input in the process (which, for instance, also adds thousands separators), provided the input is a valid number.
Usage
{{ signed number | <number> }}
- First unnamed parameter
The input value.
Examples
Code | Result |
---|---|
{{signed number|1}} |
+1 |
{{signed number|-1}} |
−1 |
{{signed number|0}} |
0 |
{{signed number|one}} |
one |
{{signed number|1000234}} |
+1,000,234 |