mirror of
https://github.com/jdejaegh/irm-kmi-api.git
synced 2025-06-26 20:05:40 +02:00
8 lines
204 B
Python
8 lines
204 B
Python
from datetime import timedelta
|
|
|
|
|
|
def next_weekday(current, weekday):
|
|
days_ahead = weekday - current.weekday()
|
|
if days_ahead < 0:
|
|
days_ahead += 7
|
|
return current + timedelta(days_ahead)
|