I have a time range of 20:00-8:00 and I want to calculate the time span between checkout and checkin but only count the time that is inside the time range. For example, if I checkin in
2019-09-15 23:00:00 and checkout at
2019-09-16 10:00:00 then the time span is only 9 hours.
Has anyone done something like this before? Seem easy to solve from reading but inevitable without using formula or face a if-else hell.
Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.