js get number of weeks between two dates code example Example: js date in two weeks date1.setDate(date.getDate() + 14);