floor
floor
Rounds a number down to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied.
Input
{{ 1.2 | floor }}
Output
1
Input
{{ 2.0 | floor }}
Output
2
Input
{{ 183.357 | floor }}
Output
183
Here the input value is a string:
Input
{{ "3.5" | floor }}
Output
3
© 2005, 2006 Tobias Luetke
Licensed under the MIT License.
登录查看完整内容