I was writting a car rental application for some customer, when i came across this problem. Fortunatelly I found the  solution easier that I thought. You have to love google! So here is the solution: Takes into account leap years and it’s tested and it works great.     function dateDiff($start, $end) { $start_ts = […]