score:0

Array's start at 0, so does the month array. Which means month 1 is February and not January which is kind of mindbreaking though. You probably want to change it to:

xAxis: {
  min: Date.UTC(2021, 0, 1),
  max: Date.UTC(2021, 11, 31)
},

score:1

After some research, I found the answer, Javascript Date.UTC() function is off by a month?

this is due to months being listed as 0-11 range.


Related Articles