Javascript date getUTCMonth() method returns the month in the specified date according to universal time. The value returned by getUTCMonth() is an integer between 0 and 11 corresponding to the month. 0 for January, 1 for February, 2 for March, and so on.
Its syntax is as follows −
Date.getUTCMonth()
Returns the month in the specified date according to universal time.
Try the following example.
<html> <head> <title>JavaScript getUTCMonth Method</title> </head> <body> <script type="text/javascript"> var dt = new Date(); document.write("getUTCMonth() : " + dt.getUTCMonth() ); </script> </body> </html>
getUTCMonth() : 6