Check that the end time is greater

main
Bob Mottram 2023-01-17 13:01:53 +00:00
parent 9f37dd1368
commit 8ebef73249
1 changed files with 16 additions and 10 deletions

View File

@ -274,16 +274,22 @@ def _html_calendar_day(person_cache: {}, translate: {},
event_class = 'calendar__day__event__public__rtl'
cal_item_class = 'calItemPublic'
if event_time:
if event_end_time and start_time_str != end_time_str:
event_time = \
'<time datetime="' + start_time_str + '">' + \
event_time + '</time> - ' + \
'<time datetime="' + end_time_str + '">' + \
event_end_time + '</time>'
else:
event_time = \
'<time datetime="' + start_time_str + '">' + \
event_time + '</time>'
event_time = \
'<time datetime="' + start_time_str + '">' + \
event_time + '</time>'
if event_time and event_end_time and \
start_time_str != end_time_str:
event_time_int_str = event_time.replace(':', '')
event_end_time_int_str = event_end_time.replace(':', '')
if event_time_int_str.isdigit() and \
event_end_time_int_str.isdigit():
if int(event_end_time_int_str) > \
int(event_time_int_str):
event_time = \
'<time datetime="' + start_time_str + '">' + \
event_time + '</time> - ' + \
'<time datetime="' + end_time_str + '">' + \
event_end_time + '</time>'
if event_time and event_description and event_place:
calendar_str += \
'<tr class="' + cal_item_class + '">' + \