Files
liquid/filters/date.md
2016-03-15 19:36:29 -04:00

554 B

title
title
date

Converts a timestamp into another date format. The format for this syntax is the same as strftime.

{% raw %}
{{ article.published_at | date: "%a, %b %d, %y" }}
{% endraw %}
Fri, Jul 17, 15
{% raw %}
{{ article.published_at | date: "%Y" }}
{% endraw %}
2015

date works on strings if they contain well-formatted dates:

{% raw %}
{{ "March 14, 2016" | date: "%b %d, %y" }}
{% endraw %}
{{ "March 14, 2016" | date: "%b %d, %y" }}