mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
749 B
749 B
title
| title |
|---|
| date |
Converts a timestamp into another date format. The format for this syntax is the same as strftime.
Input
```liquid {% raw %} {{ article.published_at | date: "%a, %b %d, %y" }} {% endraw %} ```Output
```text Fri, Jul 17, 15 ```Input
```liquid {% raw %} {{ article.published_at | date: "%Y" }} {% endraw %} ```Output
```text 2015 ```date works on strings if they contain well-formatted dates:
Input
```liquid {% raw %} {{ "March 14, 2016" | date: "%b %d, %y" }} {% endraw %} ```Output
```text {{ "March 14, 2016" | date: "%b %d, %y" }} ```