English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
getMinutes()Returns the minutes (0-59)
getMinutes()The returned value is an integer between59between the numbers.
date.getMinutes()
var d = new Date(); d.getMinutes();Test and see‹/›
All browsers fully support the getMinutes() method:
Method | |||||
getMinutes() | is | is | is | is | is |
Return value: | from59an integer between |
---|---|
JavaScript version: | ECMAScript 1 |
Return the minutes of a specific date and time:
var d = new Date(#39;August 20, 1999 23:15:30:420'); d.getMinutes();Test and see‹/›
Use getHours(), getMinutes(), getSeconds(), and getMilliseconds() methods to display the time:
setInterval(function () { var date = new Date(); var x = document.getElementById('result'); x.innerHTML = date.getHours() + :" + date.getMinutes() + :" + date.getSeconds() + ':' + date.getMilliseconds(); }, 1);Test and see‹/›