Files
liquid/_filters/ceil.md
2021-04-28 13:43:02 -04:00

667 B

title, description
title description
ceil Liquid filter that returns the ceiling of a number by rounding up to the nearest integer.

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

Input

```liquid {%- raw -%} {{ 1.2 | ceil }} {{ 2.0 | ceil }} {{ 183.357 | ceil }} {% endraw %} ```

Output

```text {{ 1.2 | ceil }} {{ 2.0 | ceil }} {{ 183.357 | ceil }} ```

Here the input value is a string:

Input

```liquid {%- raw -%} {{ "3.5" | ceil }} {% endraw %} ```

Output

```text {{ "3.5" | ceil }} ```