User:Diriector Doc/Sandbox/Number format/doc

This is an old revision of this page, as edited by Diriector Doc (talk | contribs) at 14:00, 11 April 2019 (Created Page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Summary

Use this template to easily format a number. This template will replace misplaces separators and remove any unnecessary characters, including non-number characters and additional decimal points.

Usage

{{number format|<number>|separator=<separator>|radix point=<radix point>}}

Examples

{{number format|123}} Template:Number format
{{number format|1234}} Template:Number format
{{number format|1234567890}} Template:Number format
{{number format|-1234567890}} Template:Number format
{{number format|12345.67890}} Template:Number format

{{number format|1234567890|separator=,}} Template:Number format
{{number format|1234567890|separator=~~}} Template:Number format
{{number format|1234567890|separator=}} Template:Number format Removes seperators

{{number format|12345.67890|radix point=,}} Template:Number format
{{number format|12345.67890|radix point=~~}} Template:Number format
{{number format|12345.67890|radix point=}} Template:Number format Removes radix point. Makes number hard to read, not recommended!

{{number format|---1234567890}} Template:Number format
{{number format|123456-7890}} Template:Number format
{{number format|123.4567.890}} Template:Number format Ignores second decimal point
{{number format|1 234,567'890}} Template:Number format Convertes everything to a single format
{{number format|1 23 45678 90}} Template:Number format Fixes improper formating
{{number format|12a4567b90}} Template:Number format
{{number format|1**********0}} Template:Number format
{{number format|<nowiki>12345</nowiki>}} Template:Number format ???
{{number format|1234567890123}} Template:Number format Integer too large to format (Max: 12 digit integer. No limit for decimals)
{{number format|1234567890 <ref>Some reference</ref>}} Template:Number format ???
{{number format|1234567890 [[Some link]]}} Template:Number format?
{{number format|Just text}} Template:Number format
{{number format|}} Template:Number format
{{number format}} Template:Number format Template thinks {{{1}}} is inputed

Template Data

This template will format an inputted number to fit any style and remove unnecessary characters with ease.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Number1

The number to be formatted

Default
1
Example
123.123
Numberrequired
Separatorseparator

The decimal separator for numbers 1000 and larger

Default
<space>
Example
,
Stringoptional
Radix Pointradix point

The symbol that separates the integer from the decimal value

Default
.
Example
,
Stringoptional