diff --git a/_includes/date.html b/_includes/date.html new file mode 100644 index 0000000000000000000000000000000000000000..7bd201e1e978433feb6bb6a25278d683f8865ac0 --- /dev/null +++ b/_includes/date.html @@ -0,0 +1,34 @@ +{% comment %} + Properly formats the date in yyyy[-mm] format. + Expects 'date' to be formatted as an argument. +{% endcomment %} +{% assign dateparts = date | split: "-" %} +{% assign year = dateparts[0] %} +{% assign month = dateparts[1] %} + +{% if month == '01' %} +January +{% elsif month == '02' %} +February +{% elsif month == '03' %} +March +{% elsif month == '04' %} +April +{% elsif month == '05' %} +May +{% elsif month == '06' %} +June +{% elsif month == '07' %} +July +{% elsif month == '08' %} +August +{% elsif month == '09' %} +September +{% elsif month == '10' %} +October +{% elsif month == '11' %} +November +{% elsif month == '12' %} +December +{% endif %} +{{year}} \ No newline at end of file diff --git a/_includes/people_list.html b/_includes/people_list.html index 2ec3c12e12603713924c6b91b7c4512b4ffecd70..6fe409c69ab69ccb84bd4d2e377884719a9032c8 100644 --- a/_includes/people_list.html +++ b/_includes/people_list.html @@ -15,10 +15,16 @@ <a href="{{person.url}}" class="title">{{person.fullname}}</a> <p> {% if person.start_date %} - from {{person.start_date}} <br/> + from + {% assign date = person.start_date %} + {% include date.html %} + <br/> {% endif %} {% if person.end_date %} - until {{person.end_date}} <br/> + until + {% assign date = person.end_date %} + {% include date.html %} + <br/> {% endif %} </p> </li> diff --git a/_includes/projects_list.html b/_includes/projects_list.html index 456e4c4b38b378a72b23890a1cb8ba604c3610a9..4aaa62ea9dedbf58f7107d3be90cfce296b7f0ef 100644 --- a/_includes/projects_list.html +++ b/_includes/projects_list.html @@ -13,12 +13,18 @@ <li class="collection-item avatar"> <a href="{{project.url}}" class="title">{{project.fullname}}</a> <p> - {% if project.start_date %} - from {{project.start_date}} <br/> - {% endif %} - {% if project.end_date %} - until {{project.end_date}} <br/> - {% endif %} + {% if project.start_date %} + from + {% assign date = project.start_date %} + {% include date.html %} + <br/> + {% endif %} + {% if project.end_date %} + until + {% assign date = project.end_date %} + {% include date.html %} + <br/> + {% endif %} </p> </li> {% endfor %} diff --git a/_layouts/project.html b/_layouts/project.html index ca8aaae25543154627d10dcb36d2c11c1fcb9fbf..c31e8de568dbd99877e73fb609be49bb0213022f 100644 --- a/_layouts/project.html +++ b/_layouts/project.html @@ -18,7 +18,15 @@ layout: default {% if page.start %} <p> - <b>From:</b> {{page.start}} {% if page.end %} <b>To:</b> {{page.end}} {% endif %} + <b>From:</b> + {% assign date = page.start %} + {% include date.html %} + + {% if page.end %} + <b>To:</b> + {% assign date = page.end %} + {% include date.html %} + {% endif %} </p> {% endif %} diff --git a/_layouts/system.html b/_layouts/system.html index 19a226b2227865993abf6ec56208860d73fabdbd..4a66897093ac23b0835e352046764c51ec8678a6 100644 --- a/_layouts/system.html +++ b/_layouts/system.html @@ -17,7 +17,15 @@ layout: default {% if page.start %} <p> - <b>From:</b> {{page.start}} {% if page.end %} <b>To:</b> {{page.end}} {% endif %} + <b>From:</b> + {% assign date = page.start %} + {% include date.html %} + + {% if page.end %} + <b>To:</b> + {% assign date = page.end %} + {% include date.html %} + {% endif %} </p> {% endif %}