Compare commits
2 Commits
b823c85b60
...
17c66dab6c
| Author | SHA1 | Date | |
|---|---|---|---|
| 17c66dab6c | |||
| db8feb317e |
+1
-1
@@ -49,7 +49,7 @@ def last_month_range() -> tuple[datetime, datetime, str]:
|
|||||||
today = datetime.now(timezone.utc)
|
today = datetime.now(timezone.utc)
|
||||||
first_of_this = today.replace(day=1, hour=0, minute=0, second=0, microsecond=0)
|
first_of_this = today.replace(day=1, hour=0, minute=0, second=0, microsecond=0)
|
||||||
start = (first_of_this - timedelta(days=1)).replace(day=1, hour=0, minute=0, second=0, microsecond=0)
|
start = (first_of_this - timedelta(days=1)).replace(day=1, hour=0, minute=0, second=0, microsecond=0)
|
||||||
end = first_of_this # exklusives Ende: < Juni 1 = komplett Mai
|
end = first_of_this + timedelta(days=1) # inkl. 1. Folgemonat
|
||||||
label = f"{MONTHS_DE[start.month - 1]} {start.year}"
|
label = f"{MONTHS_DE[start.month - 1]} {start.year}"
|
||||||
return start, end, label
|
return start, end, label
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user