From b2dffc9f8261ac052782ae637a8d5b9e53b60eba Mon Sep 17 00:00:00 2001 From: Mudacumura Brunoblaise Date: Mon, 1 Jan 2024 02:40:06 +0200 Subject: [PATCH] commit to the future instead of the past --- gitfiti.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gitfiti.py b/gitfiti.py index b327a1df60..ab0f6050d0 100755 --- a/gitfiti.py +++ b/gitfiti.py @@ -325,8 +325,11 @@ def calculate_multiplier(max_commits): def get_start_date(): """returns a datetime object for the first sunday after one year ago today at 12:00 noon""" - today = datetime.today() - date = datetime(today.year - 1, today.month, today.day, 12) + date = datetime(today.year, today.month, today.day, 12) + last_day = datetime(2024, 12, 31, 12) + if (date == last_day): + print("Happy New Year!") + #date = datetime(today.year + 1, today.month, today.day, 12) not important weekday = datetime.weekday(date) while weekday < 6: