JavaScript Reference/Javascript Methods/getUTCMonth

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

"getUTCMonth()" Example

    
<html>
<body>
<button onclick="var myDate = new Date(); 
                 alert(myDate.getUTCMonth());">get UTC month</button>
</body>
</html>



"getUTCMonth()" is applied to

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



"getUTCMonth()" Syntax, Parameters and Note

Note:
Returns the month based on UTC time. 
Return value: 
0 to 11, 
with 0 representing January and 11 representing December.
    
Syntax:
    
dateName.getUTCMonth()