I’m trying to write an efficient PHP function to calculate the working minutes elapsed between two timestamps. (By working minutes I mean not including weekends or time outside the range 08:30 to 17:30). The function I’ve written works but is way too slow for the 2000 or so timestamp pairs it will be required to process for each execution of the calling script.
Anyone got any ideas?