def pick_date(question: str, replay: str) -> datetime: """Prints question and returns a datetime or None.""" while True: answer = ask(question).lower() if not answer: return None date = date_utils.parse(answer) if date: replay = replay.format(date_utils.format(date)) if ask_polar_question(replay + ' Affirmative?'): return date else: print("Sorry, I couldn't understand that.")
def __str__(self): return '- {} @ {}'.format(self.content, date_utils.format(self.when))