home · contact · privacy
Explicitly use DATE_FORMAT in todays_date().
authorChristian Heller <c.heller@plomlompom.de>
Wed, 20 Mar 2024 03:03:55 +0000 (04:03 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 20 Mar 2024 03:03:55 +0000 (04:03 +0100)
plomtask/days.py

index aee4bf82354574b91b9b9f0983865daf59f54db1..04592a311e3a1abb3fc067699c72237059ee5b5a 100644 (file)
@@ -18,7 +18,7 @@ def date_valid(date: str):
 
 def todays_date():
     """Return current date in DATE_FORMAT."""
-    return str(datetime.now())[:10]
+    return datetime.now().strftime(DATE_FORMAT)
 
 
 class Day: