The service I am trying to provide is- Time based hotel booking. Instead of booking a hotel for the whole day, the users can book the hotel for the duration they desire (1 hour, 2hours, etc.).

For example- if the user chooses to book the hotel for duration of 3 hours, then the time range that the user can select should also be of 3 hours (example- 4pm- 7pm). When the user selects the booking time (4pm- 7pm) and the hotel is booked from 5pm- 7pm already, then the user should not get an option to book the hotel.