How to fix “getMonth” showing next year’s month too

This is my JavaScript code

var vals = [date.getFullYear() + (scale === YEAR ? qty : 0),
  date.getMonth() + (scale === MONTH ? qty : 0),
  date.getDate() + (scale === DAY ? qty : 0),
  date.getHours() + (scale === HOUR ? qty : 0),
  date.getMinutes() + (scale === MINUTE ? qty : 0),
  date.getSeconds() + (scale === SECOND ? qty : 0),
  date.getMilliseconds() + (scale === MILLISECOND ? qty : 0)
];

My problem is that the months are displaying till “April” which means starting from Jan to Next Year’s April. I only need to display months till December.

I am not sure if something else could be causing this problem. I’m using Gantt chart and I only want to display 12 months.