Template:Datacalc: Difference between revisions
Jump to navigation
Jump to search
Mailmanmicky (talk | contribs) mNo edit summary |
Mailmanmicky (talk | contribs) mNo edit summary |
||
Line 13: | Line 13: | ||
| gigabytes | gb = {{#switch:{{{prefix}}}|binary=* 2^30|#default=/ 10^9}} | | gigabytes | gb = {{#switch:{{{prefix}}}|binary=* 2^30|#default=/ 10^9}} | ||
| megabytes | mb = {{#switch:{{{prefix}}}|binary=* 2^20|#default=/ 10^6}} | | megabytes | mb = {{#switch:{{{prefix}}}|binary=* 2^20|#default=/ 10^6}} | ||
| kilobytes | kb = {{#switch:{{{prefix}}}|binary=10^3 / 2^10|#default=/ 10^3}} | | kilobytes | kb = {{#switch:{{{prefix}}}|binary=/ 10^3 / 2^10|#default=/ 10^3}} | ||
| #default = / 1 <!-- Default expression assumes conversion of bytes to bytes, i.e.: no conversion performed. --> | | #default = / 1 <!-- Default expression assumes conversion of bytes to bytes, i.e.: no conversion performed. --> | ||
}} | }} |
Revision as of 11:21, 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.