how can i manage working day hours
I want to ask if someone knows any API or something similar that allows me to manage concrete parts of day (for example working hours)
My problem is that I have to manage times in the next context:
imagine I am working in a company which working hours is "8am-2pm" and "3pm-6pm" and with a daylight saving time from "8am to 2pm". I want to know if a concrete moment of a concrete date is a laboral moment or if it isn't.
For example if I have the mentioned calendar, and I ask the API if the "13th august 2012 at 9pm" is a working moment it has to check it and return a correct answer (false in this case) and if I ask if the "13th august 2012 at 9am" is a working moment it has to return "true"
Other important thing related. I have to calculate intervals between two dates with the mentioned calendar. For example, if i set begin time as "today at 5pm" and end time "tomorrow at 10am" it has to return 3 hours (or its equivalent in seconds or milliseconds) because it is the correct time period passed between the begin date and the end date in this calendar.
It also has to work with holidays (particular of each country). I found an API call "JollyTime" but, although it works with holidays, it does not support the working hours...
Re: how can i manage working day hours