feat: handling various timeslot descriptions
This commit is contained in:
parent
b56cbf66a0
commit
2feb6219f7
@ -63,6 +63,11 @@ class CExtractor(Extractor):
|
||||
if not date is None and is_open:
|
||||
# we reach a new day
|
||||
result.append((date, tstart, tend))
|
||||
if isinstance(day, tuple):
|
||||
date = day[0]
|
||||
tstart = day[1]
|
||||
tend = day[2]
|
||||
else:
|
||||
date = day
|
||||
tstart = None
|
||||
tend = None
|
||||
@ -79,8 +84,14 @@ class CExtractor(Extractor):
|
||||
hours = CExtractor.find_hours(e)
|
||||
if not hours is None:
|
||||
# we found hours
|
||||
if tstart is None:
|
||||
tstart = hours[0]
|
||||
else:
|
||||
tstart = min(tstart, hours[0])
|
||||
if tend is None:
|
||||
tend = hours[1]
|
||||
else:
|
||||
tend = max(tend, hours[1])
|
||||
continue
|
||||
|
||||
if CExtractor.is_canceled(e):
|
||||
|
Loading…
Reference in New Issue
Block a user