def getHours(self): """returns floating point hours rounded up to the nearest quarter hour""" td = self.end_time - self.start_time hours = td.seconds // 3600 minutes = (td.seconds % 3600) // 60 dec = (float(minutes) / 60) quarter = dec // 0.25 if ((dec % 0.25) > 0): quarter += 0.25 return hours + quarter