I have a DateTime and a numerical duration (in minutes) that we can call selectedDateTime and seletedDuration respectively.
I also have a sharepoint list called 'Room Bookings' where each item has a DateTime and an associated duration.
How can I check if the selected timeslot overlaps with one of the timeslots already in the list and return a boolean?
ex:
| selectedDateTime | 'Room Bookings'.dateTime | 'Room Bookings'.duration |
| 2024-06-27 12AM | 2024-06-27 12AM | 60 |
| seletedDuration | 2024-06-27 12PM | 90 |
| 120 | 2024-06-27 1AM | 240 |