Assuming appointmentdates is required, the following result was found.
a selected day, I would write something like the following: // // initialize list to hold valid appointment dates l_AppointmentDates = List(); // // initialize Start Date v_GivenDate = '2022-07-21'; // // setup list to loop through (= number of days)...