ES6 - getUTCSeconds() Method



JavaScript date getUTCSeconds() method returns the seconds in the specified date according to universal time. The value returned by getUTCSeconds is an integer between 0 and 59.

Syntax

Date.getUTCSeconds ()      

Return Value

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

Example

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

Output

getUTCSeconds() : 20     
Advertisements