diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2018-02-18 22:51:57 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2018-02-18 22:51:57 +0100 |
| commit | 3c62a936378e490e99c2ac8955797464216b1691 (patch) | |
| tree | 23145a905ae399414399ebe5862d804226c8e849 /_includes/date.html | |
| download | jo.mssola.com-3c62a936378e490e99c2ac8955797464216b1691.tar.gz jo.mssola.com-3c62a936378e490e99c2ac8955797464216b1691.zip | |
Initial commit
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to '_includes/date.html')
| -rw-r--r-- | _includes/date.html | 41 |
1 files changed, 41 insertions, 0 deletions
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 %} |
