Skip to content
Log in

time_duration - Liquid Filter Reference

On this page

Description

Returns a time duration string for a given number of seconds

Property Value
Return Type string
Category dates

Examples

```liquid

{{ 10 | time_duration }} ```

Output: less than 20 seconds

```liquid

{{ 30 | time_duration }} ```

Output: less than a minute

```liquid

{{ 3600 | time_duration }} ```

Output: about 1 hour

```liquid

{{ 18000 | time_duration }} ```

Output: about 5 hours

```liquid

{{ 259200 | time_duration }} ```

Output: 3 days

```liquid

{{ 1209600 | time_duration }} ```

Output: 14 days

```liquid

{{ 2592000 | time_duration }} ```

Output: about 1 month

Was this article helpful?

Was this article helpful?