I am dealing with a mongoose model that contains both start and end dates for events.
My goal is to create a query that can determine if a given start and end date conflict with any existing events in the database.
Here's an example of what I would like:
'select where' -
endDate < currentBooking.endDate && startDate < currentBooking.startDate) || end > currentBooking.endDate && startDate > currentBooking.startDate
The question remains: How can I translate this into a mongoose query?