Преглед на файлове

Removes suffix from date in article template

No need to show 1st, 3rd etc. Plain date is enough
Talha Mansoor преди 11 години
родител
ревизия
347bf6b8cc
променени са 1 файла, в които са добавени 1 реда и са изтрити 8 реда
  1. 1 8
      templates/article.html

+ 1 - 8
templates/article.html

@@ -27,14 +27,7 @@
         <h4>Published</h4>
         {% if article.date %} 
         {% set day = article.date.strftime('%d')|int %}
-        {% set suffix = ['st', 'nd', 'rd', 'th'] %}
-        {{ article.date.strftime('%b') }} {{ day }}
-        {%- if 4 <= day <= 20 or 24 <= day <= 30 -%} {{ suffix[3] }}
-        {%- elif day % 10 - 1 == 0 -%} {{ suffix[0] }} 
-        {%- elif day % 10 - 1 == 1 -%} {{ suffix[1] }} 
-        {%- elif day % 10 - 1 == 2 -%} {{ suffix[2] }} 
-        {%- endif -%}
-        {{ article.date.strftime(', %Y') }}    
+        {{ article.date.strftime('%b') }} {{ day }} {{- article.date.strftime(', %Y') }}    
         {% endif %}
         {% if article.modified %} 
         <h4>Last Updated</h4>