1.1 --- a/imiptools/period.py Sun Feb 01 21:02:53 2015 +0100
1.2 +++ b/imiptools/period.py Sun Feb 01 21:05:55 2015 +0100
1.3 @@ -24,6 +24,20 @@
1.4
1.5 # Time management.
1.6
1.7 +def can_schedule(freebusy, periods, uid):
1.8 +
1.9 + """
1.10 + Return whether the 'freebusy' list can accommodate the given 'periods'
1.11 + employing the specified 'uid'.
1.12 + """
1.13 +
1.14 + for conflict in have_conflict(freebusy, periods, True):
1.15 + start, end, found_uid, found_transp = conflict
1.16 + if found_uid != uid:
1.17 + return False
1.18 +
1.19 + return True
1.20 +
1.21 def have_conflict(freebusy, periods, get_conflicts=False):
1.22
1.23 """