Good afternoon,
I have a table: National Holidays
- id
- data
- dascricao
I have a table: holidays (single and spliced)
- id
- data
- description
in another table: obligation (where through a user-informed "long-term" date I would have to calculate -5 days taking Saturdays, Sundays and if I have any spare date in the holiday table, and give the dateCorrect.
Example.
termLegal = 26/01/2017
Corrected data would have to be = 1/18/2017
that is (-8) because 01/25/2017 is a public holiday in SP and is in the table of holidays and 21/01/2017 is Saturday and 22/01/2017 is Sunday.