01/20/2022 - 10 days
Goes to 01/10/2022 correct date
if it falls on a Saturday -1 days, it falls on Friday
if it falls on a Sunday -2 days, it falls on Friday
if it falls on a holiday -1 days, it falls on the day before the holiday
I don’t know how your application works. But, the table with holidays can be adjusted (editable) by a privileged user. Create holidays with the state of the federation (SP, RJ, MG etc), cities… …