def sortedList(setdata): l = list(setdata) l.sort(cmp=lambda x, y: DateTime.sort(x[0], y[0])) return l
def getExpandedDates(cal, start, end): vtz = cal.getComponents()[0] expanded = vtz.expandAll(start, end) expanded.sort(cmp=lambda x, y: DateTime.sort(x[0], y[0])) return expanded