mirror of
https://github.com/kemko/liquid.git
synced 2026-01-08 19:25:40 +03:00
903 B
903 B
title, description
| title | description |
|---|---|
| floor | Liquid filter that gets the floor of a number by rounding down to the nearest integer. |
Rounds a number down to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied.
Input
```liquid {% raw %} {{ 1.2 | floor }} {% endraw %} ```Output
```text {{ 1.2 | floor }} ```Input
```liquid {% raw %} {{ 2.0 | floor }} {% endraw %} ```Output
```text {{ 2.0 | floor }} ```Input
```liquid {% raw %} {{ 183.357 | floor }} {% endraw %} ```Output
```text {{ 183.357 | floor }} ```Here the input value is a string:
Input
```liquid {% raw %} {{ "3.5" | floor }} {% endraw %} ```Output
```text {{ "3.5" | floor }} ```