For example clinic working hours on specific date are as follow:
var workingStartTime = 2018-05-12T08:00:00.000Z;
var workingEndTime = 2018-05-12T22:00:00.000Z;
Doctor's already scheduled appointments on the same date are as follow:
var busySlots =
[ {
start_time: '2018-05-12T14:30:00.000Z',end_time:'2018-05-12T17:45:00.000Z'
},
{
start_time: '2018-05-12T20:30:00.000Z',end_time: '2018-05-12T21:45:00.000Z'
}]
I need to fetch available time slots of doctor which are greater than 60 minutes starting from 2018-05-12T08:00:00.000Z
to 2018-05-12T22:00:00.000Z
timings of a day with minimum line of code in nodejs.
Following problem is similar to my query:
How to find free time slot based on available time slot and booked time slot?
But above code is in php and i need code written in nodejs.