Template:Datacalc: Difference between revisions
Jump to navigation
Jump to search
Mailmanmicky (talk | contribs) mNo edit summary |
Mailmanmicky (talk | contribs) mNo edit summary |
||
Line 3: | Line 3: | ||
{{Todo|Implement input filesize parameter that determines the exponentiation of the output filesize.}} | {{Todo|Implement input filesize parameter that determines the exponentiation of the output filesize.}} | ||
<onlyinclude><includeonly> | <onlyinclude><includeonly> | ||
{{#expr:{{{1|0}}} {{#switch:{{{output}}} | {{#expr:{{{1|0}}} / {{#switch:{{{output}}} | ||
| quettabytes | qb = | | quettabytes | qb = 10^30 | ||
| ronnabytes | rb = | | ronnabytes | rb = 10^27 | ||
| yottabytes | yb = {{#switch:{{{prefix}}}|binary= | | yottabytes | yb = {{#switch:{{{prefix}}}|binary=2^80|#default=10^24}} | ||
| zettabytes | zb = {{#switch:{{{prefix}}}|binary= | | zettabytes | zb = {{#switch:{{{prefix}}}|binary=2^70|#default=10^21}} | ||
| exabytes | eb = {{#switch:{{{prefix}}}|binary= | | exabytes | eb = {{#switch:{{{prefix}}}|binary=2^60|#default=10^18}} | ||
| petabytes | pb = {{#switch:{{{prefix}}}|binary= | | petabytes | pb = {{#switch:{{{prefix}}}|binary=2^50|#default=10^15}} | ||
| terabytes | tb = {{#switch:{{{prefix}}}|binary= | | terabytes | tb = {{#switch:{{{prefix}}}|binary=2^40|#default=10^12}} | ||
| gigabytes | gb = {{#switch:{{{prefix}}}|binary= | | gigabytes | gb = {{#switch:{{{prefix}}}|binary=2^30|#default=10^9}} | ||
| megabytes | mb = {{#switch:{{{prefix}}}|binary= | | megabytes | mb = {{#switch:{{{prefix}}}|binary=2^20|#default=10^6}} | ||
| kilobytes | kb = {{#switch:{{{prefix}}}|binary= | | kilobytes | kb = {{#switch:{{{prefix}}}|binary=2^10|#default=10^3}} | ||
| #default = | | #default = 1 <!-- Default expression assumes conversion of bytes to bytes, i.e.: no conversion performed. --> | ||
}} | }} | ||
}} {{#if:{{{nosym|}}}||{{#switch:{{{output}}} | }} {{#if:{{{nosym|}}}||{{#switch:{{{output}}} |
Revision as of 11:22, 1 June 2023
This template interprets a numbered input string in bytes and converts it to your specified output filesize. For a logical use-case, see Template:Infobox template.
Todo: Documentation
Todo: Implement input filesize parameter that determines the exponentiation of the output filesize.