9 lines
No EOL
349 B
Python
9 lines
No EOL
349 B
Python
from datetime import datetime, timedelta, timezone
|
|
def nextMonday():
|
|
now = datetime.now(timezone.utc)
|
|
days_until_monday = (0 - now.weekday() + 7) % 7
|
|
monday = now + timedelta(days=days_until_monday)
|
|
monday_9am = monday.replace(hour=9, minute=0, second=0, microsecond=0, tzinfo=timezone.utc)
|
|
return monday_9am
|
|
|
|
print(nextMonday()) |