aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/javascript/reference/global_objects/date/getday/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/de/web/javascript/reference/global_objects/date/getday/index.html')
-rw-r--r--files/de/web/javascript/reference/global_objects/date/getday/index.html69
1 files changed, 69 insertions, 0 deletions
diff --git a/files/de/web/javascript/reference/global_objects/date/getday/index.html b/files/de/web/javascript/reference/global_objects/date/getday/index.html
new file mode 100644
index 0000000000..28c185fe16
--- /dev/null
+++ b/files/de/web/javascript/reference/global_objects/date/getday/index.html
@@ -0,0 +1,69 @@
+---
+title: Date.prototype.getDay()
+slug: Web/JavaScript/Reference/Global_Objects/Date/getDay
+tags:
+ - Date
+ - JavaScript
+ - Method
+ - Prototype
+ - Reference
+translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDay
+---
+<div>{{JSRef}}</div>
+
+<p><span class="seoSummary">Die <strong><code>getDay()</code></strong> Methode gibt den Tag der Woche eines Datums gemäß der Ortszeit zurück, wobei Sonntag durch den Wert 0 repräsentiert wird.</span> Für den Tag des Monats gibt es die Methode {{jsxref("Date.prototype.getDate()", "getDate()")}}</p>
+
+<div>{{EmbedInteractiveExample("pages/js/date-getday.html")}}</div>
+
+<div class="hidden">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 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> and send us a pull request.</div>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox"><code><var>dateObj</var>.getDay()</code></pre>
+
+<h3 id="Rückgabewert">Rückgabewert</h3>
+
+<p>Eine ganze Zahl zwischen 0 und 6, die den Tag der Woche des gegebenden Datums repräsentiert: 0 für Sonntag, 1 für Montag, 2 für Dienstag und so weiter.</p>
+
+<h2 id="Beispiele">Beispiele</h2>
+
+<h3 id="Einsatz_von_getDay">Einsatz von <code>getDay()</code></h3>
+
+<p>Im zweiten Statement wird die Variable <code>weekday</code> mit dem Wert 1 initialisiert. Dabei wird der Wert des {{jsxref("Date")}} object <code>Xmas95</code> benutzt. 25. Dezember 1995 ist ein Montag.</p>
+
+<pre class="brush: js">var Xmas95 = new Date('December 25, 1995 23:15:30');
+var weekday = Xmas95.getDay();
+
+console.log(weekday); // 1
+</pre>
+
+<h2 id="Spezifikationen">Spezifikationen</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Spezifikation</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-date.prototype.getday', 'Date.prototype.getDay')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browserkompatibilität">Browserkompatibilität</h2>
+
+
+
+<p>{{Compat("javascript.builtins.Date.getDay")}}</p>
+
+<h2 id="Siehe_auch">Siehe auch</h2>
+
+<ul>
+ <li>{{jsxref("Date.prototype.getUTCDate()")}}</li>
+ <li>{{jsxref("Date.prototype.getUTCDay()")}}</li>
+ <li>{{jsxref("Date.prototype.setDate()")}}</li>
+</ul>