Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix time tracking #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions timetracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ def day_with_week(
day,
day.strftime("%Y-%m-%d"),
day.strftime("%Y-%m-%d") in days_contributed,
all(day >= off_day["start"] and day <= off_day["end"] for off_day in off_days),
len(off_days) > 0
and all(
day >= off_day["start"] and day <= off_day["end"] for off_day in off_days
),
)


Expand All @@ -129,7 +132,7 @@ def getDaysOfThisWeek() -> Tuple[datetime.datetime, ...]:
theday = datetime.datetime.today()
weekday = theday.isoweekday()
start = theday - datetime.timedelta(days=weekday - 1)
return (start + datetime.timedelta(days=d) for d in range(5))
return tuple((start + datetime.timedelta(days=d) for d in range(5)))


def getDaysOfThisMonth() -> Tuple[datetime.datetime, ...]:
Expand Down