var day1 = parseInt(new Date().valueOf()/1000); var day2 = new Date(day1 * 1000);