Sort events by start date/time

main
Luca 3 years ago
parent 72e6d9bb1a
commit 3464c58288

@ -18,6 +18,7 @@ from collections import namedtuple
from datetime import *
from icalendar import Calendar
from itertools import count
from operator import attrgetter
from xml.dom import Node
from xml.dom.minidom import getDOMImplementation
@ -136,7 +137,7 @@ def calendar_to_xml(cal):
elem('track', ''),
id=next(id),
guid=event.guid,
), events),
), sorted(events, key=attrgetter('start'))),
_name=room,
), rooms.keys(), rooms.values()),
date=day.isoformat(),

Loading…
Cancel
Save