I'm working on a fullcalendar project and I was wondering: is there a way in Javascript, with a new Date object, to check if an event include a certain period of hours?
For example: I have this event that start at 8:00 am and end at 05:00pm, I need to see if the period between 12:00am and 01.30pm is included.
These are my two Dat objects that catch the start and end hour of an event:
const starts = new Date(currentEvents[i].start._i);
const ends = new Date(currentEvents[i].end._i);
I actually change method so thanks for everyone who tried to give me an answer and spend time for this.