getBusinessDay() does not return correct business day

The function does not return a correct business day and does not honor the condition of weekend.