ES6 - getUTCMonth() Method


Advertisements


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 ()     

Return Value

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

Example

var dt = new Date( "December 25, 1995 23:15:20" ); 
console.log("getUTCMonth() : " + dt.getUTCMonth() );   

Output

getUTCMonth() : 11    

es6_date.htm

Advertisements