mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 19:34:34 +00:00
Fix: When counting working days, consider if calendar is applicable
This commit is contained in:
committed by
Dion Moult
parent
65c6876a23
commit
3fd1209906
@@ -45,7 +45,7 @@ def count_working_days(start, finish, calendar):
|
||||
and is_working_day(current_date, calendar)
|
||||
):
|
||||
result += 1
|
||||
elif not calendar:
|
||||
elif not calendar or not is_calendar_applicable(current_date, calendar):
|
||||
result += 1
|
||||
current_date += datetime.timedelta(days=1)
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user