Date.prototype.getMinutes()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
El método getMinutes()
devuelve los minutos de la fecha especificada en función de la hora local.
Sintaxis
dateObj.getMinutes()
Parámetros
Ninguno.
Devuelve
El valor devuelto por getMinutes()
es un número entero entre 0 y 59.
Ejemplos
Uso de getMinutes()
La segunda declaración del código mostrado a continuación le asigna el valor 15 a la variable minutos
, basado en el valor del Date
objeto Xmas95
.
js
var Xmas95 = new Date("December 25, 1995 23:15:30");
var minutos = Xmas95.getMinutes();
console.log(minutos); // 15
Especificaciones
Specification |
---|
ECMAScript® 2025 Language Specification # sec-date.prototype.getminutes |
Compatibilidad con navegadores
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
getMinutes |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.