JavaScript Reference/Javascript Methods/getUTCHours

Материал из Web эксперт
Перейти к: навигация, поиск

"getUTCHours()" Example

   <source lang="javascript">
   

<html> <body> <button onclick="var myDate = new Date();

                alert(myDate.getUTCHours());">get UTC hours</button>

</body> </html>


     </source>
   
  


"getUTCHours()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |Date | +----------------+--------------------------------------------------------------+

     </source>
   
  


"getUTCHours()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Returns the hour based on UTC time. Return value: 0 to 23.

Syntax:

dateName.getUTCHours()


     </source>