Package

ViewHelpers

ViewHelper Documentation

format.bytes

Formats an integer with a byte count into human-readable form.

= Examples =

{fileSize -> f:format.bytes()} 123 KB // depending on the value of {fileSize}

{fileSize -> f:format.bytes(decimals: 2, decimalSeparator: ',', thousandsSeparator: ',')} 1,023.00 B // depending on the value of {fileSize}

Arguments

value integer

The incoming data to convert, or NULL if VH children should be used

decimals integer

The number of digits after the decimal point

decimalSeparator string

The decimal point character

thousandsSeparator string

The character for grouping the thousand digits

ViewHelper Resources

Schema Resources