Vorlage:FormatNum

Us der alemannische Wikipedia, der freie Dialäkt-Enzyklopedy

Documentation

Formatiert Zahlen gemäß Wikipedia:Schreibweise von Zahlen.

Kopiervorlage[Quälltäxt bearbeite]

{{FormatNum|}}

Parameter[Quälltäxt bearbeite]

1
Zu formatierende Zahl (Dezimalpunkt ist erlaubt, nicht aber Dezimalkomma)
2
Formatangabe, siehe Wikipedia:Lua/Modul/FormatNum#format

Testtabelle[Quälltäxt bearbeite]

Parameter Ausgabe Ausgabe mit 2=ch Ausgabe mit 2=iso31_0 Parserfunktion "formatnum:"
-123456.789 −123.456,789 −123'456,789 −123 456,789 −123.456,789
-123456.7890 −123.456,789.0 −123'456,7890 −123 456,789 0 −123.456,7890
-123456,7890 −123.456,789.0 −123'456,7890 −123 456,789 0 −123.456,7.890
-12345.6 −12.345,6 −12'345,6 −12 345,6 −12.345,6
-1234.5 −1.234,5 −1234,5 −1 234,5 −1.234,5
-1234 −1.234 −1234 −1 234 −1.234
-12.34 −12,34 −12,34 −12,34 −12,34
-9.1 −9,1 −9,1 −9,1 −9,1
-9 −9 −9 −9 −9
-0.5 −0,5 −0,5 −0,5 −0,5
0 0 0 0 0
9 9 9 9 9
9.1 9,1 9,1 9,1 9,1
12.34 12,34 12,34 12,34 12,34
1234 1234 1234 1 234 1.234
1234.5 1.234,5 1234,5 1 234,5 1.234,5
12345.6 12.345,6 12'345,6 12 345,6 12.345,6
12345.67 12.345,67 12'345,67 12 345,67 12.345,67
{{#expr: 100/7}} 14,285.714.285.714 14,285714285714 14,285 714 285 714 14,285714285714
100/7 100/7 100/7 100/7 100/7
4321m 4321m 4321m 4321m 4.321m
54321m 54321m 54321m 54321m 54.321m
54321 m 54321 m 54321 m 54321 m 54.321 m
mehr als 4321 m mehr als 4321 m mehr als 4321 m mehr als 4321 m mehr als 4.321 m
ca. 4321 m ca. 4321 m ca. 4321 m ca. 4321 m ca. 4.321 m
ein Text ein Text ein Text ein Text ein Text


Lua

Vorlage:Dokumentation/Lua/Box

Verwendetes Modul: FormatNum #format

Utilities