quantlib.time.calendar.Calendar.adjust

Calendar.adjust(self, Date given_date, int convention=Following)

Adjusts a non-business day to the appropriate near business day with respect to the given convention.