kenji4861 Posted April 5, 2009 Share Posted April 5, 2009 Say I have a function like removeBusinessHours($timestampend, $timestampbegin) which gives me the difference between the two times excluding business hours and let's assume business hours to be Weekdays 8am-8pm PST. One ugly solution I can think of is to run through a loop for every second between $timestampbegin and $timestampend and do a check if it's in a business time and count++ if so, but this is a terrible solution. Any easier way of doing this? Link to comment https://forums.phpfreaks.com/topic/152695-is-there-a-way-to-subtract-business-hours-from-a-timerange/ Share on other sites More sharing options...
kenji4861 Posted April 6, 2009 Author Share Posted April 6, 2009 anyone? Any pointers would help. Link to comment https://forums.phpfreaks.com/topic/152695-is-there-a-way-to-subtract-business-hours-from-a-timerange/#findComment-801893 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.