function getDaysBetween(date1, date2) { var daysBetween = (date2 - date1)/ (1000 * 60 * 60 * 24); return Math.round(daysBetween); }