English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
getMinutes()Restituisce i minuti (0-59) dell'oggetto data specificato in base all'ora locale.
getMinutes()Il valore restituito è un numero compreso tra 0 e 59.
date.getMinutes()
var d = new Date(); d.getMinutes();Prova a vedere‹/›
Tutti i browser supportano completamente il metodo getMinutes():
Metodo | |||||
getMinutes() | È | È | È | È | È |
Valore di ritorno: | Interi da 0 a 59, rappresentano i minuti |
---|---|
JavaScript versione: | ECMAScript 1 |
Restituisci i minuti di una data e ora specifica:
var d = new Date('August 20, 1999 23:15:30:420'); d.getMinutes();Prova a vedere‹/›
Visualizza l'ora utilizzando i metodi getHours(), getMinutes(), getSeconds() e getMilliseconds():
setInterval(function () { var date = new Date(); x.innerHTML = date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds() + ':' + date.getMilliseconds(); }, 1);Prova a vedere‹/›