JavaScript getMonth()

The getMonth() method returns the month of a date as a number from 0 to 11.

To get the correct month, you must add 1: