Template:Filesize: Difference between revisions

From Hidden Palace
Jump to navigation Jump to search
No edit summary
(Add usage info)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#ifexpr: {{{1}}} < 1024|{{{1}}} bytes}} {{#ifexpr: {{{1}}} >= 1024 and {{{1}}} < 1048576|{{{1}}} ({{#expr: {{{1}}} round 1}} KB)}}</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==
{{Filesize |512}}
<nowiki>{{Filesize|512}} -></nowiki> {{Filesize|512}}
{{Filesize |1536}}
 
{{Filesize |250000}}
<nowiki>{{Filesize|1536}} -></nowiki> {{Filesize|1536}}
{{Filesize }250000000}}
 
<nowiki>{{Filesize|250000}} -></nowiki> {{Filesize|250000}}
 
<nowiki>{{Filesize|1400800}} -></nowiki> {{Filesize| 1400800}}
 
<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