def renderPeriod(self, effort): index = self.list.index(effort) previousEffort = index > 0 and self.list[index-1] or None if previousEffort and effort.getStart() == previousEffort.getStart(): return self.renderRepeatedPeriod(effort) else: return self.renderEntirePeriod(effort)
def renderEntirePeriod(self, effort): return render.dateTimePeriod(effort.getStart(), effort.getStop())