mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 06:18:09 +00:00
fix count_working_days when the start and finish are the same same hours
This commit is contained in:
@@ -62,6 +62,8 @@ def derive_calendar(task):
|
|||||||
|
|
||||||
def count_working_days(start, finish, calendar):
|
def count_working_days(start, finish, calendar):
|
||||||
result = 0
|
result = 0
|
||||||
|
if start == finish:
|
||||||
|
return 0
|
||||||
current_date = datetime.date(start.year, start.month, start.day)
|
current_date = datetime.date(start.year, start.month, start.day)
|
||||||
finish_date = datetime.date(finish.year, finish.month, finish.day)
|
finish_date = datetime.date(finish.year, finish.month, finish.day)
|
||||||
while current_date <= finish_date:
|
while current_date <= finish_date:
|
||||||
|
|||||||
Reference in New Issue
Block a user