javaScript date.getUTCmonth Method with Examples

JavaScript Date.getUTCMonth() method; Through this tutorial, i am going to show you how to get UTC month in javascript using date.getUTCmonth() method with the help of examples.

JavaScript: Date.getUTCMonth() Method

  • Date.getUTCMonth() Method
  • Syntax of JavaScript: Date.getUTCMonth() Method
  • Example of JavaScript Date.getUTCMonth() Method

Date.getUTCMonth() Method

Javascript date getUTCMonth() method is used to get the month for the specified date according to universal time. The getUTCMonth method will return an integer value between 0 and 11.

Syntax of JavaScript: Date.getUTCMonth() Method

The syntax is date.getUTCMonth method is:


Note: January is 0, February is 1, and so on.

Example of JavaScript Date.getUTCMonth() Method

Using the javascript getUTCMonth() method, you can get utc month in javaScript; as shown below:

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>JavaScript date.getUTCMonth Method</title>
  <script type = "text/javascript">
     var currentDate = new Date();
     document.write("the javascript date.getUTCMonth() : " + currentDate.getUTCMonth() ); 

Result of the above code is

the javascript date.getUTCMonth() : 11


In this javascript tutorial, you have learned how to get a month using getUTCMonth function with example.

More JavaScript Tutorials

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *