Commit cdaaaeee authored by Georgios Dagkakis's avatar Georgios Dagkakis

allow the definition of shift in weekends

parent 07cb738f
......@@ -188,6 +188,13 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
# calculate the number of days till the end of the exception
else:
exceptionDay = math.floor((exception[-1] - hoursToEndFirstDay.total_seconds()/3600)/24) + 1
# check the weekday
exceptionDate=now+datetime.timedelta(days=exceptionDay)
# if it is weekend create shift entry for that date. The default pattern does not need to be changed
if exceptionDate.weekday() in [5,6]:
defaultShiftPattern[node].append(exception)
# for exceptions in weekdays
else:
for index2, default in enumerate(defaultShiftPattern[node]):
# check if we still are in the first day
if hoursToEndFirstDay.total_seconds()/3600 > default[-1]:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment