No offense to one of the best Bubblers out there, but I think it’s going to be more complicated than what Jared suggested. First off, can we assume a user’s working days/hours won’t always be Monday through Friday from 9am to 6pm? Also, is it possible for a user to include Saturday and Sunday in their working days and exclude two other days of the week?
In order to do what you described, I think you might have to store each day and its associated hours that a user works as a separate thing in a data type so you can use those things to figure out partial hours on days when the entire span of a user’s working hours is not covered. To take weekends out of the mix, you could think about doing something like what I described in this tip I wrote a few years ago, but maybe someone knows a much better way to do that.
Anyway, unless I am missing something, I think this one’s a bit tricky, and the stuff I threw out there is really just food for thought at this point.
Hope this helps.
Best…
Mike