Generate full year calendars in Javascript

This function will generate a complete calendar data set for the specified year to be easily pushed later into tables (React, Angular, etc). Remember, months are 0 based index, 0 being January and 11 December.
const getCalendar = year => {
  const calendar = [];  
  const months = [0,1,2,3,4,5,6,7,8,9,10,11];
  months.map(month => {
    const date = new Date(year, month, 1);
    const days = [];
    while (date.getMonth() === month) {
      days.push(new Date(date).toISOString());
      date.setDate(date.getDate() + 1);
    }
    calendar.push(days);
  });
  return calendar
}

console.log(getCalendar(2019));