aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/javascript/reference/global_objects/date/getmonth
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
commit4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch)
treed4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/de/web/javascript/reference/global_objects/date/getmonth
parent33058f2b292b3a581333bdfb21b8f671898c5060 (diff)
downloadtranslated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip
initial commit
Diffstat (limited to 'files/de/web/javascript/reference/global_objects/date/getmonth')
-rw-r--r--files/de/web/javascript/reference/global_objects/date/getmonth/index.html83
1 files changed, 83 insertions, 0 deletions
diff --git a/files/de/web/javascript/reference/global_objects/date/getmonth/index.html b/files/de/web/javascript/reference/global_objects/date/getmonth/index.html
new file mode 100644
index 0000000000..5c5d8ceed7
--- /dev/null
+++ b/files/de/web/javascript/reference/global_objects/date/getmonth/index.html
@@ -0,0 +1,83 @@
+---
+title: Date.prototype.getMonth()
+slug: Web/JavaScript/Reference/Global_Objects/Date/getMonth
+tags:
+ - Date
+ - JavaScript
+ - Method
+ - Prototype
+ - Reference
+translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMonth
+---
+<div>{{JSRef}}</div>
+
+<p>Die <strong><code>getMonth()</code></strong> Methode gibt den Monat eines Datums bezüglich der Ortszeit zurück. Diese Monat ist ein 0 basierter Wert (wobei 0 den ersten Monat des Jahres beschreibt).</p>
+
+<div>{{EmbedInteractiveExample("pages/js/date-getmonth.html")}}</div>
+
+
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox"><code><var>dateObj</var>.getMonth()</code></pre>
+
+<h3 id="Rückgabewert">Rückgabewert</h3>
+
+<p>Eine ganze Zahl zwischen 0 und 11, welche den Monat des gegebenen Datums bezüglich der lokalen Zeit angibt. 0 steht für Januar, 1 für Februar und so weiter.</p>
+
+<h2 id="Beispiele">Beispiele</h2>
+
+<h3 id="Einsatz_von_getMonth()">Einsatz von <code>getMonth()</code></h3>
+
+<p>Im zweiten Statement wird der Variablen <code>month</code> der Wert 11 zugewiesen. Dieses geschiet auf Basis des {{jsxref("Date")}} Objektes <code>Xmas95</code>.</p>
+
+<pre class="brush: js">var Xmas95 = new Date('December 25, 1995 23:15:30');
+var month = Xmas95.getMonth();
+
+console.log(month); // 11
+</pre>
+
+<h2 id="Spezifikationen">Spezifikationen</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Spezifikation</th>
+ <th scope="col">Status</th>
+ <th scope="col">Kommentar</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>Initiale Definition. Implementiert in JavaScript 1.0.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.9.5.12', 'Date.prototype.getMonth')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-date.prototype.getmonth', 'Date.prototype.getMonth')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-date.prototype.getmonth', 'Date.prototype.getMonth')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browserkompatibilität">Browserkompatibilität</h2>
+
+<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
+
+<p>{{Compat("javascript.builtins.Date.getMonth")}}</p>
+
+<h2 id="See_also" name="See_also">Siehe auch</h2>
+
+<ul>
+ <li>{{jsxref("Date.prototype.getUTCMonth()")}}</li>
+ <li>{{jsxref("Date.prototype.setMonth()")}}</li>
+</ul>