def __repr__(self): t = filters.formattime(self.time) d = filters.humandelta(datetime.utcnow(), self.time) if self.code == JamStatusCode.ANNOUNCED: return "Announced for {0}".format(t) elif self.code == JamStatusCode.RUNNING: return "Running until {0} ({1} left)".format(t, d) elif self.code == JamStatusCode.PACKAGING: return "Packaging until {0} ({1} left)".format(t, d) elif self.code == JamStatusCode.RATING: return "Rating until {0} ({1} left)".format(t, d) elif self.code == JamStatusCode.PACKAGING: return "Finished since {0}".format(t) return "Database error."
def __repr__(self): t = formattime(self.time) d = humandelta(datetime.utcnow(), self.time) if self.code == JamStatusCode.ANNOUNCED: return f"Announced for {t}" elif self.code == JamStatusCode.REGISTRATION: return f"Registrations until {t}" elif self.code == JamStatusCode.RUNNING: return f"Running until {t} ({d} left)" elif self.code == JamStatusCode.PACKAGING: return f"Packaging until {t} ({d} left)" elif self.code == JamStatusCode.RATING: return f"Rating until {t} ({d} left)" elif self.code == JamStatusCode.PACKAGING: return f"Finished since {t}" return "Database error."