JavaScript getUTCDate() Method with Example

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

JavaScript: Date.getUTCDate() Method

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

Date.getUTCDate() Method

Javascript date getUTCDate() method is used to get the day of the month in the specified date according to universal time. The getUTCDate method will return an integer value between 1 and 31.

Syntax of JavaScript: Date.getUTCDate() Method

The syntax is date.getUTCDate method is:

 Date.getUTCDate()

Note that:- about getUTCDate, Returns the day of the month in the specified date according to universal time.

Example of JavaScript: Date.getUTCDate() Method

To get utc date using the getUTCDate() method; as shown below in example:

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

Output of the above code; as shown below:

JavaScript date.getUTCDate Method

Conclusion

In this javascript tutorial, you have learned getUTCDate function with example.

More JavaScript Tutorials

Be First to Comment

Leave a Reply

Your email address will not be published.