Pages

Javascript Date getUTCHours() Method

Description:

Javascript date getUTCHours() method returns the hours in the specified date according to universal time. The value returned by getUTCHours is an integer between 0 and 23.

Syntax:

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

Return Value:

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

Example:

The following example prints the hours portion of the current time to the variable hrs.
<html>
<head>
<title>JavaScript getUTCHours Method</title>
</head>
<body>
<script type="text/javascript">
   var dt = new Date();
   document.write("getUTCHours() : " + dt.getUTCHours() ); 
</script>
</body>
</html>
This will produce following result for Indian time zone:
getUTCHours() : 14 
 
 
+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  
  

No comments:

Flag Counter
| Copyright © 2013 Remote Tutor