Difference between revisions of "Template:Thousands separator"

From comp.tf
Jump to navigation Jump to search
m
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{#if:{{#sub:{{{1|}}}|-21|-18}}|{{#sub:{{{1|}}}|-21|-18}}{{{2|,}}}|}}{{#if:{{#sub:{{{1|}}}|-18|-15}}|{{#sub:{{{1|}}}|-18|-15}}{{{2|,}}}|}}{{#if:{{#sub:{{{1|}}}|-15|-12}}|{{#sub:{{{1|}}}|-15|-12}}{{{2|,}}}|}}{{#if:{{#sub:{{{1|}}}|-12|-9}}|{{#sub:{{{1|}}}|-12|-9}}{{{2|,}}}|}}{{#if:{{#sub:{{{1|}}}|-9|-6}}|{{#sub:{{{1|}}}|-9|-6}}{{{2|,}}}|}}{{#if:{{#sub:{{{1|}}}|-6|-3}}|{{#sub:{{{1|}}}|-6|-3}}{{{2|,}}}|}}{{#sub:{{{1|}}}|-3|}}
+
<includeonly>{{#if:{{#sub:{{{1|}}}|-21|-18}}|{{#sub:{{{1|}}}|-21|-18}}{{{2|,}}}|}}{{#if:{{#sub:{{{1|}}}|-18|-15}}|{{#sub:{{{1|}}}|-18|-15}}{{{2|,}}}|}}{{#if:{{#sub:{{{1|}}}|-15|-12}}|{{#sub:{{{1|}}}|-15|-12}}{{{2|,}}}|}}{{#if:{{#sub:{{{1|}}}|-12|-9}}|{{#sub:{{{1|}}}|-12|-9}}{{{2|,}}}|}}{{#if:{{#sub:{{{1|}}}|-9|-6}}|{{#sub:{{{1|}}}|-9|-6}}{{{2|,}}}|}}{{#if:{{#sub:{{{1|}}}|-6|-3}}|{{#sub:{{{1|}}}|-6|-3}}{{{2|,}}}|}}{{#sub:{{{1|}}}|-3|}}</includeonly><noinclude>{{documentation}}[[Category:Templates]]</noinclude>

Latest revision as of 06:48, 10 December 2019

(view - edit) Documentation

Inserts separators for large numbers. Uses the comma (,) character by default. Only works for numbers with 21 or less digits.

Usage

{{Thousands_separator|123456789}}

Returns:

123,456,789

{{Thousands_separator|123456789|.}}

Returns:

123.456.789