JSFiddle - React, Tailwind, and code Playground

JavaScript

var todaydate = new Date(); 
var datetime =  todaydate.getMonth()+1  + "-" 
                +todaydate.getDate() + "-"
                + todaydate.getFullYear() + " "  
                + todaydate.getHours() + ":"  
                + todaydate.getMinutes() + ":" 
                + todaydate.getSeconds();


var d1 = new Date(datetime);
var d2=new Date('2015','06'-1,'08','15','34','60');

var timeDiff = Math.abs(d2.getTime() - d1.getTime());
var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)); 
alert(diffDays);