Date.prototype.getMinutes()
Die getMinutes()
Methode gibt die Minuten eines Datums bezüglich der Ortszeit zurück.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Syntax
dateObj.getMinutes()
Rückgabewert
Eine ganze Zahl zwischen 0 und 59, welche die Minuten der gegebenen Zeit bezüglich der lokalen Zeit angibt.
Beispiele
Einsatz von getMinutes()
Im zweiten Statement wird die Variable minutes
mit dem Wert 15 initialisiert. Dieses wird mit dem Wert des Date
Objektes Xmas95
erreicht.
var Xmas95 = new Date('December 25, 1995 23:15:30');
var minutes = Xmas95.getMinutes();
console.log(minutes); // 15
Spezifikationen
Spezifikation | Status | Kommentar |
---|---|---|
ECMAScript 1st Edition (ECMA-262) | Standard | Initiale Definition. Implementiert in JavaScript 1.0. |
ECMAScript 5.1 (ECMA-262) Die Definition von 'Date.prototype.getMinutes' in dieser Spezifikation. |
Standard | |
ECMAScript 2015 (6th Edition, ECMA-262) Die Definition von 'Date.prototype.getMinutes' in dieser Spezifikation. |
Standard | |
ECMAScript (ECMA-262) Die Definition von 'Date.prototype.getMinutes' in dieser Spezifikation. |
Lebender Standard |
Browserkompatibilität
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.