Template:Datacalc/doc

From Valve Developer Community
< Template:Datacalc
Revision as of 12:39, 1 June 2023 by Mailmanmicky (talk | contribs) (Created page with "{{Doc/subpage}} {{infobox template | summary = Converts a filesize string | type = Mathematics template | contrib = mailmanmicky | cre...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Edit-copy.png
This is a documentation subpage for Template:Datacalc.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Template:Datacalc
Logo-template.png
Summary
Converts a filesize string
Type
Mathematics template
Contributors
Creation date
02/06/2023
(02 June 2022)
Notes
N/A
Subpages
Documentation
Preload
N/A
Sandbox
N/A
Strings
N/A
Testcases
N/A
Other
N/A
Revision information
Latest editor
Mailmanmicky
Last edited
01/06/2023
20230601123955
Revision size
1596 bytes
1.596 kilobytes
0.001596 megabytes
Technical information
Page identifier
53975
Contains translations
No
Uses parser functions?
Yes
Uses variables?
No

This template interprets a numbered input string in bytes and converts it into a specified output filesize. For a logical use-case, see Template:Infobox template.

Copy and Paste

{{Infobox | 1 = | output = }}

Usage & Preview

{{Datacalc}}
Parameter Description Example Preview
{{{1}}} Input string, interpreted by default as bytes.
| 1 = 1000
1000 bytes
{{{output}}} Input filesize, i.e.: kilobytes.
| output = kb
1 kilobytes
{{{prefix}}} Unit prefix; used to determine exponential power.
| prefix = binary
0.9765625 kibibytes
{{{round}}} Used to round up the output string
| round = 2
0.98 kibibytes