fix incorrect date display omitting years

This commit is contained in:
Lephe 2021-07-14 10:19:02 +02:00
parent 875524ccb6
commit 19586f9087
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ def filter_date(date, format="%Y-%m-%d à %H:%M"):
[date.month - 1]
# Omit current year in the last 8 months
if (date - datetime.now()).days <= 8 * 30:
if (datetime.now() - date).days <= 8 * 30:
format = f"{d} {m} à %H:%M"
else:
format = f"{d} {m} %Y à %H:%M"