English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
getUTCSeconds()Returns the number of seconds (0-59)
getUTCSeconds()The returned value is between 0 and59an integer.
World Standard Time (UTC) is the time standard set for world time.
For information about the minutes, seegetUTCMinutes()Method.
For information about the hour, seegetUTCHours()Method.
date.getUTCSeconds()
var d = new Date(); d.getUTCSeconds();Test and see‹/›
All browsers fully support the getUTCSeconds() method:
Method | |||||
getUTCSeconds() | is | is | is | is | is |
Return value: | to59an integer between |
---|---|
JavaScript version: | ECMAScript 1 |
Return the number of seconds for a specific date and time:
var d = new Date('July 30, 1992, 20:18:04 UTC' d.getUTCSeconds();Test and see‹/›
Display time using the getUTCHours(), getUTCMinutes(), getUTCSeconds(), and getUTCMilliseconds() methods:
setInterval(function () { var d = new Date(); var x = document.getElementById('result' x.innerHTML = d.getUTCHours() + :" + d.getUTCMinutes() + :" + d.getUTCSeconds() + ':' + d.getUTCMilliseconds(); }, 1);Test and see‹/›