Метод getMinutes()
повертає хвилини у вказаній даті згідно з місцевим часом.
Синтаксис
dateObj.getMinutes()
Повертає
Ціле число між 0 та 59, що відображає хвилини у наданій даті згідно з місцевим часом.
Приклади
Використання getMinutes()
Друга інструкція, наведена нижче, присвоює 15 змінній minutes
на основі значення об'єкта Date
на ім'я Xmas95
.
var Xmas95 = new Date('December 25, 1995 23:15:30');
var minutes = Xmas95.getMinutes();
console.log(minutes); // 15
Специфікації
Специфікація |
---|
ECMAScript (ECMA-262) The definition of 'Date.prototype.getMinutes' in that specification. |
Сумісність з веб-переглядачами
BCD tables only load in the browser
The compatibility table in 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.