I want to point to the next working day for a given day using java. BUT the conditions goes on increasing when i am using own calendar api to manipulate dates since I had to consider the usual weekends and the pointing to the next day and also i had to consider the regional holidays in my region.
Because I have to pass the date to calendar api to check the day is working or not.If the day the working then fine . If the day is a holiday how can i get the next working day(Because i have to pass date to api to check whether it is holiday or not). Do i have to use infinite loop and keep on hitting the api by incrementing the day each time. and check the api response everytime
The Restapi is I am using is external api which we have to use to check the holidays. I can't save holidays in Database.
If 27th,28th is holiday and 29th is working ,how can i pass the dates to this api.
API Request :
{
"Data": {
"Date": "27/04/2020"
}
}
API Response :
{
"Data": {
"Holidaystatus":"Is Holiday"
}
}
Please help!