This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JavaScript Dates

The getMonth() Method

Return the month of a date as a number from 0 to 11.

To get the correct month number, you must add 1:

const d = new Date();
document.getElementById("demo").innerHTML = d.getMonth() + 1;