瀏覽代碼

Removes leading zero from date

Talha Mansoor 11 年之前
父節點
當前提交
3fcd67d7b5
共有 1 個文件被更改,包括 1 次插入1 次删除
  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] }}