Skip to content

Commit

Permalink
bug: double minus
Browse files Browse the repository at this point in the history
  • Loading branch information
synsi23b committed May 21, 2023
1 parent 2994d19 commit a95084a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nightly_timesheet_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def update_flextime(employees:list[Angestellter]):
# only run on the second last sunday, else ignore
if d == secondlast_sunday:
# get last month and create the checkpoint on the monday after the previous second-to-last sunday
d = d - timedelta(days=-30)
d = d - timedelta(days=30)
monthcal = c.monthdatescalendar(d.year, d.month)
sundays = [day for week in monthcal for day in week if day.weekday() == calendar.SUNDAY and day.month == d.month]
secondlast_sunday = sundays[-2]
Expand Down

0 comments on commit a95084a

Please sign in to comment.