time_ago - Liquid Filter Reference
On this page
Description
Returns a time distance string for a given date
| Property | Value |
|---|---|
| Return Type | string |
| Category | dates |
Examples
```liquid
{{ “2021-06-30T23:00:00Z” | time_ago }} ```
Output: about 10 hours
```liquid
{{ “2021-07-01T08:59:30Z” | time_ago }} ```
Output: less than a minute
```liquid
{{ “2021-05-01T09:00:00Z” | time_ago }} ```
Output: 2 months
```liquid
{{ “2021-03-01T09:00:00Z” | time_ago }} ```
Output: 4 months
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.