Template:Filesize: Difference between revisions

From Hidden Palace
Jump to navigation Jump to search
No edit summary
(Add usage info)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{#ifexpr: {{{1}}} < 1024|{{{1}}} B}}{{#ifexpr: {{{1}}} >= 1024 and {{{1}}} < 1048576|{{#expr: {{{1}}}/1024 round 1}} KB}}{{#ifexpr: {{{1}}} >= 1048576 and {{{1}}} < 1073741824|{{#expr: {{{1}}}/1048576 round 2}} MB}}{{#ifexpr: {{{1}}} >= 1073741824|{{#expr: {{{1}}}/1073741824 round 2}} GB}}</includeonly>
<includeonly>{{#ifexpr: {{{1}}} < 1024|{{{1}}} B}}{{#ifexpr: {{{1}}} >= 1024 and {{{1}}} < 1048576|{{#expr: {{{1}}}/1024 round 1}} KB}}{{#ifexpr: {{{1}}} >= 1048576 and {{{1}}} < 1073741824|{{#expr: {{{1}}}/1048576 round 2}} MB}}{{#ifexpr: {{{1}}} >= 1073741824|{{#expr: {{{1}}}/1073741824 round 2}} GB}}</includeonly><noinclude>
<noinclude>
==Usage==
<nowiki>{{Filesize|512}} -></nowiki> {{Filesize|512}}
<nowiki>{{Filesize|512}} -></nowiki> {{Filesize|512}}
<nowiki>{{Filesize|1536}} -></nowiki> {{Filesize|1536}}
<nowiki>{{Filesize|1536}} -></nowiki> {{Filesize|1536}}
<nowiki>{{Filesize|250000}} -></nowiki> {{Filesize|250000}}
<nowiki>{{Filesize|250000}} -></nowiki> {{Filesize|250000}}
<nowiki>{{Filesize|1400800}} -></nowiki> {{Filesize| 1400800}}
<nowiki>{{Filesize|1400800}} -></nowiki> {{Filesize| 1400800}}
<nowiki>{{Filesize|900123456102}} -></nowiki> {{Filesize| 900123456102}}
<nowiki>{{Filesize|900123456102}} -></nowiki> {{Filesize| 900123456102}}
</noinclude>
</noinclude>

Latest revision as of 23:30, June 25, 2017

Usage

{{Filesize|512}} -> 512 B

{{Filesize|1536}} -> 1.5 KB

{{Filesize|250000}} -> 244.1 KB

{{Filesize|1400800}} -> 1.34 MB

{{Filesize|900123456102}} -> 838.31 GB