aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/javascript/reference/global_objects/date/valueof
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/valueof
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/valueof')
-rw-r--r--files/de/web/javascript/reference/global_objects/date/valueof/index.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/files/de/web/javascript/reference/global_objects/date/valueof/index.html b/files/de/web/javascript/reference/global_objects/date/valueof/index.html
new file mode 100644
index 0000000000..18f540fa4d
--- /dev/null
+++ b/files/de/web/javascript/reference/global_objects/date/valueof/index.html
@@ -0,0 +1,85 @@
+---
+title: Date.prototype.valueOf()
+slug: Web/JavaScript/Reference/Global_Objects/Date/valueOf
+tags:
+ - Date
+ - JavaScript
+ - Method
+ - Prototype
+ - Reference
+translation_of: Web/JavaScript/Reference/Global_Objects/Date/valueOf
+---
+<div>{{JSRef}}</div>
+
+<p>Die <strong><code>valueOf()</code></strong> Methode gibt den primitiven Wert eines {{jsxref("Date")}} Objektes zurück.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/date-valueof.html")}}</div>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox"><code><var>dateObj</var>.valueOf()</code></pre>
+
+<h3 id="Rückgabewert">Rückgabewert</h3>
+
+<p>Die Anzahl der Millisekunden zwischen dem 1. Januar 1970 00:00:00 UTC und dem gegebenen date Objekt.</p>
+
+<h2 id="Beschreibung">Beschreibung</h2>
+
+<p>Die <code>valueOf()</code> Methode gibt den primitiven Wert eines {{jsxref("Date")}} Objektes als Nummern-Datentyp (number) zurück. Diese Nummer entspricht der Anzahl der Millisekunden seit dem 1. Januar 1970 UTC.</p>
+
+<p>Diese Methode hat den gleiche Funktionsumfang wie die {{jsxref("Date.prototype.getTime()")}} Methode.</p>
+
+<p>Diese Methode wird intern von JavaScript aufgerufen und muss nicht explizit im Quelltext verwendet werden.</p>
+
+<h2 id="Beispiele">Beispiele</h2>
+
+<h3 id="Einsatz_von_valueOf()">Einsatz von <code>valueOf()</code></h3>
+
+<pre class="brush: js">var x = new Date(56, 6, 17);
+var myVar = x.valueOf(); // schreibt -424713600000 auf myVar
+</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.1.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.9.5.8', 'Date.prototype.valueOf')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-date.prototype.valueof', 'Date.prototype.valueOf')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-date.prototype.valueof', 'Date.prototype.valueOf')}}</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.valueOf")}}</p>
+
+<h2 id="Siehe_auch">Siehe auch</h2>
+
+<ul>
+ <li>{{jsxref("Object.prototype.valueOf()")}}</li>
+ <li>{{jsxref("Date.prototype.getTime()")}}</li>
+</ul>