From 3c62a936378e490e99c2ac8955797464216b1691 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Sun, 18 Feb 2018 22:51:57 +0100 Subject: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- _includes/date.html | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 _includes/date.html (limited to '_includes/date.html') diff --git a/_includes/date.html b/_includes/date.html new file mode 100644 index 0000000..f12692a --- /dev/null +++ b/_includes/date.html @@ -0,0 +1,41 @@ + +{% assign day = include.date | date: "%-d" %} +{% capture day %}{{ day }}{% endcapture %} + +{% case day %} +{% when "1" or "11" %} + {% capture pre %} l'{% endcapture %} +{% else %} + {% capture pre %} el {% endcapture %} +{% endcase %} + +{% assign month = include.date | date: "%-m" %} +{% case month %} +{% when "1" %} + {% capture month %}Gener{% endcapture %} +{% when "2" %} + {% capture month %}Febrer{% endcapture %} +{% when "3" %} + {% capture month %}Març{% endcapture %} +{% when "4" %} + {% capture month %}Abril{% endcapture %} +{% when "5" %} + {% capture month %}Maig{% endcapture %} +{% when "6" %} + {% capture month %}Juny{% endcapture %} +{% when "7" %} + {% capture month %}Juliol{% endcapture %} +{% when "8" %} + {% capture month %}Agost{% endcapture %} +{% when "9" %} + {% capture month %}Setembre{% endcapture %} +{% when "10" %} + {% capture month %}Octubre{% endcapture %} +{% when "11" %} + {% capture month %}Novembre{% endcapture %} +{% when "12" %} + {% capture month %}Desembre{% endcapture %} +{% endcase %} + +{% assign year = include.date | date: "%Y" %} +{% capture year %}{{ year }}{% endcapture %} -- cgit v1.2.3