From 2232f9157c6310cb0476f270f58f035626d953f5 Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Sun, 15 Mar 2015 18:20:32 -0700 Subject: [PATCH] Add documentation for `date` --- _filters/date.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/_filters/date.md b/_filters/date.md index 1c281473..cfc81821 100644 --- a/_filters/date.md +++ b/_filters/date.md @@ -1,3 +1,12 @@ --- title: date --- + +`date` converts a timestamp into another date format. + +| Input | Output | +|-------------------------------------------:|:-------| +| {% raw %}`{{ article.published_at | date: "%a, %b %d, %y" }}` {% endraw %} | Tue, Apr 22, 14 | +| {% raw %}`{{ article.published_at | date: "%Y" }}` {% endraw %} | 2014 | + +The format for this syntax is the same as [`strftime`](http://strftime.net/).