Strip the leading zero when displaying dates
authorAlex Chan <alex@alexwlchan.net>
Sun, 2 Feb 2020 19:05:07 +0000 (19:05 +0000)
committerAlex Chan <alex@alexwlchan.net>
Sun, 2 Feb 2020 19:05:07 +0000 (19:05 +0000)
e.g. "1 February", not "01 February".

scripts/render_html.py

index 47cb890..053a598 100755 (executable)
@@ -90,7 +90,7 @@ def render_date(date_value):
     )
 
     if date_match.group("day"):
-        return date_obj.strftime("%d %B %Y")
+        return date_obj.strftime("%-d %B %Y")
     else:
         return date_obj.strftime("%B %Y")