Difference of points in time
Let's find the difference between the two points in time:
let date1 = new Date();
let date2 = new Date(2015, 4, 25, 12, 59, 59);
console.log(date1 - date2); // difference in milliseconds
Determine the number of days between
January 1st and September
10th of the current year.
Determine the number of days between
20th of the current month and
10th of the next month.