1const date1 = new Date('7/13/2010');
2const date2 = new Date('12/15/2010');
3const diffTime = Math.abs(date2 - date1);
4const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
5console.log(diffTime + " milliseconds");
6console.log(diffDays + " days");