moment js - to find if dates are same by day 1

moment js – to find if dates are same by day

var iscurrentDate = startTime.isSame(new Date(), "day");
if(iscurrentDate) {

}

Here is what the above code is Doing:
1. It’s getting the current date and time.
2. It’s getting the start time of the event.
3. It’s checking if the start time is the same as the current date.
4. If it is, it’s doing something.

Similar Posts