Skip to main content

remove a leading zero from last modified (e.g. 3 July instead of 03 July)

ID
0c2ef80
date
2023-07-17 04:14:52+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
4de7868
message
remove a leading zero from last modified (e.g. 3 July instead of 03 July)
changed files
1 file, 1 addition, 1 deletion

Changed files

aws/s3tree.py (6238) → aws/s3tree.py (6239)

diff --git a/aws/s3tree.py b/aws/s3tree.py
index 89231e5..0161d0f 100755
--- a/aws/s3tree.py
+++ b/aws/s3tree.py
@@ -198,7 +198,7 @@ if __name__ == "__main__":
     elif last_modified.year != datetime.date.today().year:
         last_modified_message = f"in {last_modified.strftime('%B %Y')}"
     else:
-        last_modified_message = last_modified.strftime("%d %B")
+        last_modified_message = last_modified.strftime("%-d %B")
 
     print(
         termcolor.colored(