def next_weekday(d, weekday):
 days_ahead = (weekday - d.weekday())
 if (days_ahead <= 0):
  days_ahead += 7
 return (d + datetime.timedelta(days_ahead))

def next_weekday ( d , weekday ) : days_ahead = ( weekday - d . weekday ( ) ) if ( days_ahead <= 0 ) : days_ahead += 7 return ( d + datetime . timedelta ( days_ahead ) )
return the next week day starting from d .