function days_difference(startDate, endDate) {
const oneDay = 24 * 60 * 60 * 1000; // hours * minutes * seconds * milliseconds
return Math.round((endDate - startDate) / oneDay);
}
const dt1 = new Date('11/04/2019')
const dt2 = new Date('11/07/2019')
console.log(days_difference(dt1, dt2));
/*
run:
3
*/