Use number filters to convert, manipulate, and display numbers.
Returns the absolute value of a number.
abs
Limits a number to a minimum value
at_least: number
Limits a number to a maximum value
at_most: number
Returns the next integer value greater than or equal to the current value.
ceil: integer
Divide the current value by operand.
divided_by: object operand
Returns the next integer value less than or equal to the current value.
floor: integer
Returns the object formatted as a string using the provided format string. For numbers, the behavior is the same as the format_number filter below. The format filter may also be used with dates and time_diffs but they require different format strings.
Returns the number formatted as a string using the provided standard or custom format string.
format_number: format
Subtracts the operand from the current value.
minus: object operand
Return the remainder of the current value when divided by the operand.
modulo: object operand
Adds the operand to the current value. Note that this filter behaves differently if the current value is a string.
plus: object operand
Returns a random integer between 0 and the current integer.
rand
Rounds a decimal value to the specified number of places.
round: integer places = 0
Multiply the current value by the operand. Note that this filter behaves differently if the current value is a string and the operand is an integer.
times: object operand
Converts the input into an integer. Useful when grabbing query parameters or other string inputs.
to_int
Converts the input into a number, which could be an integer or a fractional number.
to_number