mirror of
https://github.com/rottenwheel/revuo-weekly.git
synced 2024-11-09 20:53:37 +01:00
new_issue: adjust get_period_string so leading zeroes are omitted for dates
This commit is contained in:
parent
a9925aca61
commit
541b9f7a83
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user