mozilla

Compare Revisions

Date.prototype.toString()

Change Revisions

Revision 81802:

Revision 81802 by evilpie on

Revision 321181:

Revision 321181 by ethertank on

Title:
toString
Date.toString
Slug:
JavaScript/Reference/Global_Objects/Date/toString
JavaScript/Reference/Global_Objects/Date/toString
Tags:
"Date"
Content:

Revision 81802
Revision 321181
n7    <p>n
8      &nbsp;
9    </p>
10    <h3 id="Summary" name="Summary">7    <h2 id="Summary" name="Summary">
n12    </h3>n9    </h2>
n20            Method of <a href="/en/JavaScript/Reference/Global_Obn17            Method of <a href="/en-US/docs/JavaScript/Reference/G
>jects/Date" title="en/JavaScript/Reference/Global_Objects/Date"><>lobal_Objects/Date" title="JavaScript/Reference/Global_Objects/Da
>code>Date</code></a>>te"><code>Date</code></a>
n43    <h3 id="Syntax" name="Syntax">n40    <h2 id="Syntax" name="Syntax">
n45    </h3>n42    </h2>
46    <p>43    <pre class="syntaxbox">
47      <code>toString()</code>44<code>toString() </code>
48    </p>45</pre>
n55    <h3 id="Description" name="Description">n52    <h2 id="Description" name="Description">
n57    </h3>n54    </h2>
n59      The <code><a href="/en/JavaScript/Reference/Global_Objects/n56      The <code><a href="/en-US/docs/JavaScript/Reference/Global_
>Date" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Date>Objects/Date" title="JavaScript/Reference/Global_Objects/Date">Da
>">Date</a></code> object overrides the <code>toString</code> meth>te</a></code> object overrides the <code>toString</code> method o
>od of the <code><a href="/en/JavaScript/Reference/Global_Objects/>f the <code><a href="/en-US/docs/JavaScript/Reference/Global_Obje
>Object" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Ob>cts/Object" title="JavaScript/Reference/Global_Objects/Object">Ob
>ject">Object</a></code> object; it does not inherit <code><a href>ject</a></code> object; it does not inherit <code><a href="/en-US
>="/en/JavaScript/Reference/Global_Objects/Object/toString" title=>/docs/JavaScript/Reference/Global_Objects/Object/toString" title=
>"en/Core_JavaScript_1.5_Reference/Global_Objects/Object/toString">"JavaScript/Reference/Global_Objects/Object/toString">Object.toSt
>>Object.toString</a></code>. For <code><a href="/en/JavaScript/Re>ring</a></code>. For <code><a href="/en-US/docs/JavaScript/Refere
>ference/Global_Objects/Date" title="en/Core_JavaScript_1.5_Refere>nce/Global_Objects/Date" title="JavaScript/Reference/Global_Objec
>nce/Global_Objects/Date">Date</a></code> objects, the <code>toStr>ts/Date">Date</a></code> objects, the <code>toString</code> metho
>ing</code> method returns a string representation of the object.>d returns a string representation of the object.
n67    <h3 id="Examples" name="Examples">n64    <h2 id="Examples" name="Examples">
nn66    </h2>
67    <h3 id="Example:_Using_toString" name="Example:_Using_toStrin
 >g">
68      Example: Using <code>toString</code>
n70    <h4 id="Example:_Using_toString" name="Example:_Using_toStrinn
>g"> 
71      Example: Using <code>toString</code>
72    </h4>
n76    <pre>n73    <pre class="brush:js">
77x = new Date();74var x = new Date();
75 
78myVar=x.toString();   //assigns a value to myVar similar to:76myVar=x.toString(); //assigns a value to myVar similar to:
79     //Mon Sep 28 1998 14:36:22 GMT-0700 (Pacific Daylight Time)77                                        //Mon Sep 28 1998 14:36:2
 >2 GMT-0700 (Pacific Daylight Time)
n81    <h3 id="See_also" name="See_also">n79    <h2 id="See_also" name="See_also">
n83    </h3>n81    </h2>
n86        <a href="/en/JavaScript/Reference/Global_Objects/Object/tn84        <a href="/en-US/docs/JavaScript/Reference/Global_Objects/
>oString" title="en/Core_JavaScript_1.5_Reference/Global_Objects/O>Object/toString" title="JavaScript/Reference/Global_Objects/Objec
>bject/toString">Object.toString</a>>t/toString">Object.toString</a>
n89        <a href="/en/JavaScript/Reference/Global_Objects/Date/toDn87        <a href="/en-US/docs/JavaScript/Reference/Global_Objects/
>ateString" title="en/Core_JavaScript_1.5_Reference/Global_Objects>Date/toDateString" title="JavaScript/Reference/Global_Objects/Dat
>/Date/toDateString">toDateString</a>>e/toDateString">Date.toDateString</a>
n92        <a href="/en/JavaScript/Reference/Global_Objects/Date/toTn90        <a href="/en-US/docs/JavaScript/Reference/Global_Objects/
>imeString" title="en/Core_JavaScript_1.5_Reference/Global_Objects>Date/toTimeString" title="JavaScript/Reference/Global_Objects/Dat
>/Date/toTimeString">toTimeString</a>>e/toTimeString">Date.toTimeString</a>
n95        <a href="/en/JavaScript/Reference/Global_Objects/Date/toLn93        <a href="/en-US/docs/JavaScript/Reference/Global_Objects/
>ocaleString" title="en/Core_JavaScript_1.5_Reference/Global_Objec>Date/toLocaleString" title="JavaScript/Reference/Global_Objects/D
>ts/Date/toLocaleString">toLocaleString</a>>ate/toLocaleString">Date.toLocaleString</a>
t98    <p>t
99      {{ languages( { "pl": "pl/Dokumentacja_j\u0119zyka_JavaScri
>pt_1.5/Obiekty/Date/toString" } ) }} 
100    </p>

Back to History