change file name
This commit is contained in:
parent
5255f319f1
commit
348d6dd2f3
@ -44,15 +44,13 @@ import locale
|
|||||||
loc = locale.getlocale()
|
loc = locale.getlocale()
|
||||||
print (loc)
|
print (loc)
|
||||||
|
|
||||||
datum = input('Datum: ')
|
from datetime import datetime, timedelta
|
||||||
td = datetime.timedelta(int(input('Abstand: ')))
|
# Zwei datetime-Objekte erstellen
|
||||||
datum1 = time.strptime(datum, '%Y-%m-%d')
|
start_time = datetime(2024, 6, 1, 0, 0, 0)
|
||||||
datum2 = (datetime.datetime.fromtimestamp(time.mktime(datum1)) - td)
|
end_time = datetime(2024, 6, 10, 0, 0, 0)
|
||||||
print(datum2.strftime('%Y-%m-%d'))
|
# Zeitdelta berechnen
|
||||||
|
duration = end_time - start_time
|
||||||
print(datum2.strftime('Der Wochentag ist %A'))
|
print(duration) # Ausgabe: 9 Tage, 2:30:00
|
||||||
locale.setlocale(locale.LC_ALL, ('de_DE', 'UTF-8'))
|
|
||||||
print(datum2.strftime('Der Wochentag ist %A'))
|
|
||||||
|
|
||||||
def init_monitor(topics):
|
def init_monitor(topics):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user