Credits Script: Use padding for month and day in date

Credits are generated with a footer that reads
"Generated by 'credits_git_gen.py' 2026/6/22".
It is better to pad the month and day so that they appear as
"2026/06/02".

Ref !160527
This commit is contained in:
Damien Picard 2026-06-22 16:44:53 +02:00 • committed by Campbell Barton
parent b718fce723
commit 1543338543

View file

@ -258,7 +258,7 @@ class Credits:
now = datetime.datetime.now()
fn = os.path.basename(__file__)
fh.write(
"<p><center><i>Generated by '{:s}' {:d}/{:d}/{:d}</i></center></p>\n".format(
"<p><center><i>Generated by '{:s}' {:d}/{:02d}/{:02d}</i></center></p>\n".format(
fn, now.year, now.month, now.day,
))