Wikipedia:Lua/Modul/FormatNum/Test

Vorlagenprogrammierung Diskussionen Lua Test Unterseiten
Modul Deutsch English

Modul: Dokumentation

Testfälle der Funktionen im Modul FormatNum bei Nutzung als Vorlage.

failsafe

  • 2020-08-06
  • 1970-01-01 – »2020-08-06«
  • 2425-12-31 – »«
  • wikidata – »2020-08-06«

format

Parameter Erwartet Generiert
»1000« »1000« »1000«
»1000.1« »1.000,1« »1.000,1«
»-1000« »-1.000« »-1.000«
»–1000« »–1.000« »–1000«
»+1000« »+1.000« »+1.000«
» 10000 « »10.000« »10.000«
» Null « » Null « » Null «
dewiki
»0.030« »0,030« »0,030«
»0,030« »0,030« »0,030«
»0« »0« »0«
»0.« »0« »0«
»0,« »0,« »0,«
»0,0« »0,0« »0,0«
»0.0« »0,0« »0,0«
»1000« »1000« »1000«
»1.000« »1,000« »1,000«
»10.000« »10,000« »10,000«
»10000« »10.000« »10.000«
»10,000« »10,000« »10,000«
»10,000000« »10,000000« »10,000000«
»-123456.789« »-123.456,789« »-123.456,789«
»-123456.7890« »-123.456,789.0« »-123.456,789.0«
»-123456.7890123« »-123.456,789.012.3« »-123.456,789.012.3«
»-12345.6« »-12.345,6« »-12.345,6«
»-1234.5« »-1.234,5« »-1.234,5«
»-1234« »-1.234« »-1.234«
»-12.34« »-12,34« »-12,34«
»-9.1« »-9,1« »-9,1«
»-9« »-9« »-9«
»-0.5« »-0,5« »-0,5«
»9« »9« »9«
»9.1« »9,1« »9,1«
»12.34« »12,34« »12,34«
»1234.5« »1.234,5« »1.234,5«
»12345.6« »12.345,6« »12.345,6«
»12345.67« »12.345,67« »12.345,67«
»09.1« »09,1« »09,1«
»4321m« »4321m« »4321m«
»mehr als 4321 m« »mehr als 4321 m« »mehr als 4321 m«
»ca. 4321 m« »ca. 4321 m« »ca. 4321 m«
» Null « » Null « » Null «
de_currency
»0.030« »0,030« »0,030«
»0,030« »0,030« »0,030«
»0« »0« »0«
»0.« »0« »0«
»0,« »0,« »0,«
»0,0« »0,0« »0,0«
»0.0« »0,0« »0,0«
»1000« »1.000« »1.000«
»1.000« »1,000« »1,000«
»10.000« »10,000« »10,000«
»10000« »10.000« »10.000«
»10,000« »10,000« »10,000«
»10,000000« »10,000000« »10,000000«
»-123456.789« »-123.456,789« »-123.456,789«
»-123456.7890« »-123.456,789.0« »-123.456,7890«
»-123456.7890123« »-123.456,789.012.3« »-123.456,7890123«
»-12345.6« »-12.345,6« »-12.345,6«
»-1234.5« »-1.234,5« »-1.234,5«
»-1234« »-1.234« »-1.234«
»-12.34« »-12,34« »-12,34«
»-9.1« »-9,1« »-9,1«
»-9« »-9« »-9«
»-0.5« »-0,5« »-0,5«
»9« »9« »9«
»9.1« »9,1« »9,1«
»12.34« »12,34« »12,34«
»1234.5« »1.234,5« »1.234,5«
»12345.6« »12.345,6« »12.345,6«
»12345.67« »12.345,67« »12.345,67«
»09.1« »09,1« »09,1«
»4321m« »4321m« »4321m«
»mehr als 4321 m« »mehr als 4321 m« »mehr als 4321 m«
»ca. 4321 m« »ca. 4321 m« »ca. 4321 m«
» Null « » Null « » Null «
de
»0.030« »0,030« »0,030«
»0,030« »0,030« »0,030«
»0« »0« »0«
»0.« »0« »0«
»0,« »0,« »0,«
»0,0« »0,0« »0,0«
»0.0« »0,0« »0,0«
»1000« »1 000« »1 000«
»1.000« »1,000« »1,000«
»10.000« »10,000« »10,000«
»10000« »10 000« »10 000«
»10,000« »10,000« »10,000«
»10,000000« »10,000000« »10,000000«
»-123456.789« »-123 456,789« »-123 456,789«
»-123456.7890« »-123 456,789 0« »-123 456,789 0«
»-123456.7890123« »-123 456,789 012 3« »-123 456,789 012 3«
»-12345.6« »-12 345,6« »-12 345,6«
»-1234.5« »-1 234,5« »-1 234,5«
»-1234« »-1 234« »-1 234«
»-12.34« »-12,34« »-12,34«
»-9.1« »-9,1« »-9,1«
»-9« »-9« »-9«
»-0.5« »-0,5« »-0,5«
»9« »9« »9«
»9.1« »9,1« »9,1«
»12.34« »12,34« »12,34«
»1234.5« »1 234,5« »1 234,5«
»12345.6« »12 345,6« »12 345,6«
»12345.67« »12 345,67« »12 345,67«
»09.1« »09,1« »09,1«
»4321m« »4321m« »4321m«
»mehr als 4321 m« »mehr als 4321 m« »mehr als 4321 m«
»ca. 4321 m« »ca. 4321 m« »ca. 4321 m«
» Null « » Null « » Null «
en
»0.030« »0.030« »0.030«
»0,030« »0,030« »0,030«
»0« »0« »0«
»0.« »0« »0«
»0,« »0,« »0,«
»0,0« »0,0« »0,0«
»0.0« »0.0« »0.0«
»1000« »1,000« »1,000«
»1.000« »1.000« »1.000«
»10.000« »10.000« »10.000«
»10000« »10,000« »10,000«
»10,000« »10,000« »10,000«
»10.000000« »10.000000« »10.000000«
»« »« »«
»10000« »10.000« »10.000«
»10000« »10.000« »10.000«
»10000« »10.000« »10.000«
»10000« »10.000« »10000«

minus

Parameter Erwartet Generiert
» -1 « » -1 « » -1 «
» −1 « » -1 « » -1 «
» 1 « » 1 « » 1 «
» Null « » Null « » Null «

padding

Parameter Erwartet Generiert
3.1415 | 7 | . »3.1415000« »3.1415000«
3.1415 | 2 | . »3.1415« »3.1415«
3.1415 | -4 | . »0003.1415« »0003.1415«
3.1415 | -1 | . »3.1415« »3.1415«

roman2number

Parameter Erwartet Generiert
I »1« »1«
DXXXXVII »547« »547«
MCMXII »1912« »1912«
»« »« »«
»« »«
Graf Zahl »« »«
xix »19« »19«
XV. »« »«
XV. | %.$ »15« »«
XVIII<sup>ème</sup> | %< »18« »18«
LXIVrd | [snr][td]$ »64« »64«

round

Parameter Erwartet Generiert
12345.|2|method=0 »12345.« »12345.«
12345|0|method=0 »12345« »12345«
12345.|-0|method=0 »12345« »12345«
12345|-2|method=0 »12300« »12300«
123.456478|2|method=0 »123.46« »123.46«
123.4|2|method=0 »123.4« »123.4«
123.4|2 »123.4« »123.4«
123.4|0|method=0 »123.« »123.«
123.4|-1|method=0 »120.« »120.«
567.8|0 »568.« »568.«
567.8|-0 »568« »568«
567.8|1 »567.8« »567.8«
567.8|2 »567.8« »567.8«
567.80|2 »567.80« »567.80«
123.4|-1|method=0 »120.« »120.«
1.4| 2|method=1 |format=dewiki| padding=2 »1,40« »1,40«
1.4| 0|method=1 |format=dewiki »1« »1«
1.4| 2|method=1 | padding=2 »1,40« »1,40«
1.414 | 2| padding=2 »1,41« »1,41«
1.4 | 2| padding=2 »1,40« »1,40«
1.400 | 2 »1.400« »1.40«

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.