What do you get with the following code?
let date = new Date('2021-01-01'); let month = date.getMonth();
"January"
0
1