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.
Its syntax is as follows −
Date.getUTCHours ()
Returns the hours in the specified date according to universal time.
Try the following example.
<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>
getUTCHours() : 11