Well, I have been spinning for the past two days, trying to figure it out.
I am working on a system that handles "cases". Each case has a type, and each type has an associated SLA that can be specified in days, hours or minutes. In addition to this, there is an administrative function that allows the user to specify the start and end time of the working day and the days of the week. I must indicate that the working hours are the same for each working day. So, for example, working hours can be from 9:00 to 13:30 on Monday, Wednesday and Thursday. I'm not going to worry about holidays in this function yet ... It's quite complicated as it is!
Given the days and hours of operation and the SLA, how can I calculate the date and time when it violates the SLA.
I get the feeling that since the minimum SLA resolution is set in minutes, I need to convert everything to minutes first. Obviously, the day / time in which the case is created must also be taken into account. Besides these two nuggets of wisdom, I will be honest ... I flounder :-)
Absolutely any help would be greatly appreciated in this regard. It is probably worth mentioning that if there is a library there, I will be glad to use it and move on. C # is my preferred language, but any solution would be great
Thank you very much in advance.
source share