We have a requirement to create a report definition that will list all the cases got resolved yesterday considering weekends and business holidays. For example, if the report is being run on Monday then Saturday and Sunday being weekends it will check if Friday is Business holiday or not. If Friday is Holiday as per the business calendar then it will fetch the results for Thursday. Else it will get the results for Friday.
We have an instance of calendar (Data-Admin-Calendar) in our application where Closed days are mentioned. We have also written a SQL function to consider weekends. However we are not sure how to incorporate/check for Business Calendar holidays using the SQL Function.
Given the above scenario please help us on how to check if some particular day is a holiday as per the business calendar using the SQL function.