mirror of
https://github.com/kemko/liquid.git
synced 2026-01-06 02:05:41 +03:00
893 B
893 B
title, description
| title | description |
|---|---|
| ceil | Liquid filter that gets 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 }} {% endraw %} ```Output
```text {{ 1.2 | ceil }} ```Input
```liquid {% raw %} {{ 2.0 | ceil }} {% endraw %} ```Output
```text {{ 2.0 | ceil }} ```Input
```liquid {% raw %} {{ 183.357 | ceil }} {% endraw %} ```Output
```text {{ 183.357 | ceil }} ```Here the input value is a string:
Input
```liquid {% raw %} {{ "3.5" | ceil }} {% endraw %} ```Output
```text {{ "3.5" | ceil }} ```