2023-09-01 12:42:55 +00:00
|
|
|
import time
|
|
|
|
import datetime
|
|
|
|
|
2023-09-01 13:00:55 +00:00
|
|
|
import deltachat
|
2023-09-01 12:42:55 +00:00
|
|
|
|
2023-09-01 13:00:55 +00:00
|
|
|
|
|
|
|
def loop(ac: deltachat.Account):
|
2023-09-01 12:42:55 +00:00
|
|
|
current_day = 0
|
|
|
|
while True:
|
|
|
|
if check_new_day(current_day):
|
|
|
|
pass
|
|
|
|
print(current_day)
|
|
|
|
current_day = update_day()
|
|
|
|
time.sleep(1)
|
|
|
|
|
|
|
|
|
|
|
|
def check_new_day(current_day):
|
2023-09-01 13:00:55 +00:00
|
|
|
if current_day != datetime.datetime.now().day:
|
2023-09-01 12:42:55 +00:00
|
|
|
return True
|
2023-09-01 13:00:55 +00:00
|
|
|
return False
|
2023-09-01 12:42:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
def update_day():
|
|
|
|
return datetime.datetime.now().day
|