Date.prototype.getMinutes()
O método getMinutes()
retorna os minutos em uma data específica de acordo com o horário local.
Sintaxe
dateObj.getMinutes()
Retorna
Um número inteiro, entre 0 e 59, representando os minutos em uma data de acordo com o horário local.
Exemplos
Usando o getMinutes()
The second statement below assigns the value 15 to the variable minutes
, based on the value of the Date
object Xmas95
.
No exemplo abaixo, a segunda linha atribui o valor 15 à variável minutes
, baseado no valor de objeto Global_Objects/Date
Xmas95
.
var Xmas95 = new Date('December 25, 1995 23:15:30');
var minutes = Xmas95.getMinutes();
console.log(minutes); // 15
Especificações
Specification | Status | Comment |
---|---|---|
ECMAScript 1st Edition (ECMA-262) | Padrão | Definição inicial. Implementado no JavaScript 1.0. |
ECMAScript 5.1 (ECMA-262) The definition of 'Date.prototype.getMinutes' in that specification. |
Padrão | |
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'Date.prototype.getMinutes' in that specification. |
Padrão | |
ECMAScript (ECMA-262) The definition of 'Date.prototype.getMinutes' in that specification. |
Padrão em tempo real |
Compatibilidade com navegadores
BCD tables only load in the browser