import time import datetime import locale loc = locale.getlocale() print (loc) from datetime import datetime, timedelta, date # Zwei datetime-Objekte erstellen # from datetime import date start_time = date.today() print(start_time.strftime("%d.%m.%Y")) ruhestand = date(2025, 6, 10) # Zeitdelta berechnen duration = ruhestand - start_time print("Tage: " + str(duration.days)) print("Wochen: " + str(round(duration.days / 7,3))) print("Monate: " + str(round(duration.days / 30,3))) print("Jahre: " + str(round(duration.days / 365,3))) print("Stunden: " + str(duration.days *24))