Date.prototype.getMinutes()
Resum
El mètode getMinutes()
retorna els minuts de la data especificada segons el temps local.
Sintaxi
dateObj.getMinutes()
Paràmetres
Cap.
Retorna
El valor retorna per getMinutes()
és un nombre sencer entre 0 i 59.
Exemples
Exemple: Utilitzar getMinutes()
La segona sentència de sota assigna el valor 15 a la variable minuts
, prenent el valor de l'objecte nadal95
de tipus Date
.
var nadal95 = new Date('December 25, 1995 23:15:30');
var minuts = nadal95.getMinutes();
console.log(minuts); // 15
Especificacions
Especificació | Estat | Comentaris |
---|---|---|
ECMAScript 1a Edició. | Standard | Definició inicial. Implementat a JavaScript 1.0. |
ECMAScript 5.1 (ECMA-262) The definition of 'Date.prototype.getMinutes' in that specification. |
Standard | |
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'Date.prototype.getMinutes' in that specification. |
Standard |
Compatibilitat amb navegadors
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Suport bàsic | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
Característica | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Suport bàsic | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |