Returns the absolute value of a number.
abs
Will attempt to convert the input to a number before calculating the absolute value, and will return 0 if it is unable to convert the input to a number.
Limits the input to a minimum value.
at_least: Number minimum
Converts both the input and the minimum values to numbers if they are not already numbers. If the input and minimum values cannot both be converted to numbers, return the unaltered input instead.
Limits the input to a maximum value.
at_most: Number maximum
Converts both the input and the maximum values to numbers if they are not already numbers. If the input and maximum values cannot both be converted to numbers, return the unaltered input instead.
Returns the next integer value greater than or equal to the input.
ceil
Attempts to converts the input to a number if it is not already a number. Returns null if it is unable to convert the input to a number.
Converts the input into a formatted currency as specified by language_tag.
currency: String language_tag
Attempts to convert the input to a number, and if it cannot be converted to a number, the currency filter will return the input as a string instead. If the input is null, returns null. Passing an invalid language_tag results in undefined behavior - likely resulting in a liquid error.
Divide the input by operand.
divided_by: Number operand
Returns the next integer value less than or equal to the input value.
floor
Attempts to converts the input to a number if it is not already a number. Returns null if it is unable to convert the input to a number.
Returns the input formatted as a string using the provided format string. The format string must be a valid standard or custom .NET numeric format string.
format_number: String format
Returns null if the input cannot be converted to a number.
number
Subtracts the operand from the input.
minus: Number operand
Return the remainder of the input when divided by the operand.
modulo: Number operand
If the input is negative, the result will also be negative. Otherwise the result will be positive.
Adds the operand to the current value. Note that this filter behaves differently if the current value is a string
plus: Number operand
The plus filter may behave differently when used with string input. When used with a string input it may append text to the current value, although that behavior is deprecated and should be replaced by the append filter for optimal forward-compatibility.
Rounds the input to the specified number of decimal places.
round: Integer places
Attempts to converts the input to a number if it is not already a number. Returns null if it is unable to convert the input to a number, or if places is specified but cannot be converted to an integer. If the input is exactly halfway between the smaller and larger number, the round filter will attempt to round toward the nearest even number in the last decimal place (eg: 4.35 rounded to one decimal place would be 4.4)
Multiply the input by the operand.
times: Number operand
This filter currently behaves differently if the input is a string and the operand is an integer. In that case the result is a list of strings with input repeated operand times.
{{ time }}
Converts the input to an integer.
to_int
If the input is null, returns 0. If the input is non-null and cannot be convert to an integer, returns null.
Converts the input to a number.
to_number
If the input is null, returns 0. If the input is non-null and cannot be convert to an integer, returns null.
number