aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/javascript/reference/global_objects/date/settime
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/settime
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/settime')
-rw-r--r--files/de/web/javascript/reference/global_objects/date/settime/index.html91
1 files changed, 91 insertions, 0 deletions
diff --git a/files/de/web/javascript/reference/global_objects/date/settime/index.html b/files/de/web/javascript/reference/global_objects/date/settime/index.html
new file mode 100644
index 0000000000..aaf72c378a
--- /dev/null
+++ b/files/de/web/javascript/reference/global_objects/date/settime/index.html
@@ -0,0 +1,91 @@
+---
+title: Date.prototype.setTime()
+slug: Web/JavaScript/Reference/Global_Objects/Date/setTime
+tags:
+ - Date
+ - JavaScript
+ - Method
+ - Prototype
+ - Reference
+translation_of: Web/JavaScript/Reference/Global_Objects/Date/setTime
+---
+<div>{{JSRef}}</div>
+
+<p>Die Methode <strong><code>setTime()</code></strong> setzt das {{jsxref("Date")}} Objekt auf die Zeit, die durch eine Anzahl Millisekunden seit dem 1. Januar 1970, 00:00:00 UTC angegeben wird.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/date-settime.html")}}</div>
+
+
+
+<h2 id="Syntax" name="Syntax">Syntax</h2>
+
+<pre class="syntaxbox"><code><var>dateObj</var>.setTime(<var>timeValue</var>)</code></pre>
+
+<h3 id="Parameters" name="Parameters">Parameter</h3>
+
+<dl>
+ <dt><code>timeValue</code></dt>
+ <dd>Ein integer, der die Anzahl Millisekunden seit dem 1. Januar 1970, 00:00:00 UTC angibt.</dd>
+</dl>
+
+<h3 id="Rückgabewert">Rückgabewert</h3>
+
+<p>Die Anzahl der Millisekunden zwischen dem 1. Januar 1970 00:00:00 UTC und dem geänderten date Objekt (effektiv dem Wert des übergebenen Parameters).</p>
+
+<h2 id="Description" name="Description">Beschreibung</h2>
+
+<p>Die Methode <code>setTime()</code> ist hilfreich, um Datum und Zeit einem anderen {{jsxref("Date")}} Objekt zuzuweisen.</p>
+
+<h2 id="Examples" name="Examples">Beispiele</h2>
+
+<h3 id="Example:_Using_setTime" name="Example:_Using_setTime">Einsatz von <code>setTime()</code></h3>
+
+<pre class="brush: js">var theBigDay = new Date('July 1, 1999');
+var sameAsBigDay = new Date();
+sameAsBigDay.setTime(theBigDay.getTime());
+</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>Erste Definition. Implementiert JavaScript 1.0.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.9.5.27', 'Date.prototype.setTime')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-date.prototype.settime', 'Date.prototype.setTime')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-date.prototype.settime', 'Date.prototype.setTime')}}</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.setTime")}}</p>
+
+<h2 id="See_also" name="See_also">Siehe auch</h2>
+
+<ul>
+ <li>{{jsxref("Date.prototype.getTime()")}}</li>
+ <li>{{jsxref("Date.prototype.setUTCHours()")}}</li>
+</ul>