Formats a number with specific min- and max-Fraction-Digits (localized) und scientific notation.



Syntax

ormat_reportNumber(mixed $number, ?string $fmtType = 'num', ?string $fmtDecimal = '1.0-2'): string

  • $number
    The number to format.

  • $fmtType
    M
    • "num" - Normal number format
    • "si" - Scientific notation
    • "duration" - 
    • "task-duration" - 

  • $fmtDecimal
    Determines how many  leading digits and fraction-digits shall be shown. 
    String format is:   "<num digits>.<minFrac>-<maxFrac>"
    E.g. "1.0-2"


Examples

Numbers

{{ hublify.format_reportNumber( 123456.1 , 0, 4) }}    =>    123.456,1