The getUTCSeconds()
method returns the seconds in the specified date according to universal time.
dateObj.getUTCSeconds()
None.
The value returned by getUTCSeconds()
is an integer between 0 and 59.
getUTCSeconds()
The following example assigns the seconds portion of the current time to the variable seconds
.
var today = new Date(); var seconds = today.getUTCSeconds();
Created by Mozilla Contributors, license: CC-BY-SA 2.5