I have two intervals of times , let's say
- Interval X: [01-11-2019 08:00, 01-11-2019 14:00]
- Interval Y: [01-11-2019 12:00, 01-11-2019 17:00]
I need to get the intersect between these intervals so the answer should be 2 hours because the interval Y intersect with interval X in 2 hours only, so how to do that in Carbon ? Is there any library or function to do that ? I've searched but no useful results. Thanks
Please note i mean difference between two intervals not just startDate and endDate