Pages

Javascript Date getUTCMonth() Method

Description:

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.

Syntax:

Date.getUTCMonth()
Here is the detail of parameters:
  • NA

Return Value:

Returns the month in the specified date according to universal time.

Example:

The following example prints the month portion of the current time to the variable hrs.
<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>
This will produce following result:
getUTCMonth() : 7 
 
+JavaScript +JavaScript Frameworks Links +Javascript Development 
+JavaScript's and More, Software and Marketing +JavascriptU +JavaScriptOn 
+Javascript Problems +JavaScriptOn 
 +javaScript is a creek in West Virginia in the summe  
+enJineS +JavascriptU +Javascript Tutor  
  

No comments:

Flag Counter
| Copyright © 2013 Remote Tutor