From 541b9f7a83adbe8f44785acf34972aa2d0f73e87 Mon Sep 17 00:00:00 2001 From: rottenwheel <92872541+rottenwheel@users.noreply.github.com> Date: Fri, 9 Aug 2024 18:53:28 +0000 Subject: [PATCH] new_issue: adjust get_period_string so leading zeroes are omitted for dates --- new_issue.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/new_issue.py b/new_issue.py index 92e285d..eb61d93 100755 --- a/new_issue.py +++ b/new_issue.py @@ -26,11 +26,11 @@ def get_period_string( if period_start.year == period_end.year: if period_start.month == period_end.month: period_string = ( - f"{period_start.strftime('%B %d')} - {period_end.strftime('%d')}" + f"{period_start.strftime('%B %-d')} - {period_end.strftime('%-d')}" ) else: period_string = ( - f"{period_start.strftime('%B %d')} - {period_end.strftime('%B %d')}" + f"{period_start.strftime('%B %-d')} - {period_end.strftime('%B %-d')}" ) if year: @@ -38,7 +38,7 @@ def get_period_string( else: period_string = ( - f"{period_start.strftime('%B %d, %Y')} - {period_end.strftime('%B %d, %Y')}" + f"{period_start.strftime('%B %-d, %Y')} - {period_end.strftime('%B %-d, %Y')}" ) return period_string