Files
liquid/filters/floor.md
2016-03-15 19:36:29 -04:00

543 B

title
title
floor

Rounds a number down to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied.

{% raw %}
{{ 1.2 | floor }}
{% endraw %}
{{ 1.2 | floor }}
{% raw %}
{{ 2.0 | floor }}
{% endraw %}
{{ 2.0 | floor }}
{% raw %}
{{ 183.357 | floor }}
{% endraw %}
{{ 183.357 | floor }}

Here the input value is a string:

{% raw %}
{{ "3.5" | floor }}
{% endraw %}
{{ "3.5" | floor }}