Javatpoint Logo
Javatpoint Logo

JavaScript Date getMonth() method

The JavaScript date getMonth() method returns the integer value that represents month in the specified date on the basis of local time. The value returned by getMonth() method starts with 0 that represents January.


The getMonth() method is represented by the following syntax:


An integer value between 0 and 11 that represents the month in the specified date.

JavaScript Date getMonth() method example

Here, we will understand getMonth() method through various examples.

Example 1

Let's see an example to print current month.

Test it Now



Example 2

Let's see an example to print the month from the given date.

Test it Now



Next TopicJavaScript Math

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA