Explorar o código

Removes leading zero from date

Talha Mansoor %!s(int64=11) %!d(string=hai) anos
pai
achega
3fcd67d7b5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      templates/article.html

+ 1 - 1
templates/article.html

@@ -31,7 +31,7 @@ hell {{ article.title }} - {{ super() }}
                 <p>
                 {% set day = article.date.strftime('%d')|int %}
                 {% set suffix = ['st', 'nd', 'rd', 'th'] %}
-                {{ article.date.strftime('%b %d') }}
+                {{ 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] }}