Files
liquid/_filters/ceil.md
2021-04-22 17:19:13 -04:00

664 B

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

Rounds the 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 }} ```