12-07-2018 02:02 AM - edited 03-14-2019 06:39 PM
Dear all
We are using attached hoiday script but it doesnt work correctly.
Example if i set xml file as below
Holidays><Holiday1><Date>11/16/2018</Date><Open>7:00 AM</Open><Closed>9:00 AM</Closed></Holiday1></Holidays>
If my current time is 11/16/2018 , 8AM , it checks and comeback as working day ( Holiday set to false) , But if the current time is 11/16/2018 , 10 AM , it comeback as working day instead of closed ( Holiday set to true) . We cannot push this to production. Need help to check the script.
Regards
MOhamed
12-07-2018 08:24 AM - edited 12-19-2018 11:25 AM
It sounds like what you are describing, that it's working as designed.
The Holiday document's intention is to close the call center for the entire day, unless a new set of open and close hours are specified, in which case, the call center will be open during those hours, and closed otherwise.
Are you expecting the opposite? Like, if you specified an open and closed time for a day, those are the hours you want to close the call center, and otherwise, it should be open?
If that's the case, then you'll just need to either:
A) re-write the logic to its inverse
B) Use two dates/times for each date
E.g.,
<Holiday1> <!-- First part of the day, we're closed --> <Date>11/16/2018</Date> <Open>00:00 AM</Open> <Closed>7:00 AM</Closed> </Holiday1> <!-- The inbetween time (7:00am to 9:00am) we're open --> <Holiday2> <!-- The second part of the day, we're closed again --> <Date>11/16/2018</Date> <Open>9:00 AM</Open> <Closed>11:59:59 PM</Closed> </Holiday2>
12-19-2018 12:47 AM
Thank you Anthony , i will check and update you.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide