Revision 8654 of Date.prototype.getMilliseconds()

  • Revision slug: JavaScript/Reference/Global_Objects/Date/getMilliseconds
  • Revision title: getMilliseconds
  • Revision id: 8654
  • Created:
  • Creator: evilpie
  • Is current revision? No
  • Comment 5 words added, 9 words removed

Revision Content

Returns the milliseconds in the specified date according to local time.

Method of Date
Implemented in 1.3
ECMAScript Edition ECMAScript 1st Edition

Syntax

getMilliseconds()

Parameters

None.

Description

The value returned by getMilliseconds is a number between 0 and 999.

Examples

Example: Using getMilliseconds

The following example assigns the milliseconds portion of the current time to the variable ms.

var ms;
Today = new Date();
ms = Today.getMilliseconds(); 

See Also

getUTCMilliseconds, setMilliseconds

{{ languages( { "fr": "fr/R\u00e9f\u00e9rence_de_JavaScript_1.5_Core/Objets_globaux/Date/getMilliseconds", "ja": "ja/Core_JavaScript_1.5_Reference/Global_Objects/Date/getMilliseconds", "pl": "pl/Dokumentacja_j\u0119zyka_JavaScript_1.5/Obiekty/Date/getMilliseconds" } ) }}

Revision Source

<p>
</p>
<p>Returns the milliseconds in the specified date according to local time.
</p>
<table class="standard-table"> <thead> <tr> <th class="header" colspan="2">Method of <a href="/en/JavaScript/Reference/Global_Objects/Date"><code>Date</code></a></th> </tr> </thead> <tbody> <tr> <td>Implemented in</td> <td>1.3</td> </tr> <tr> <td>ECMAScript Edition</td> <td>ECMAScript 1st Edition</td> </tr> </tbody>
</table> <h3 name="Syntax"> Syntax </h3>
<p><code>
getMilliseconds()
</code>
</p>
<h3 name="Parameters"> Parameters </h3>
<p>None.
</p>
<h3 name="Description"> Description </h3>
<p>The value returned by <code>getMilliseconds</code> is a number between 0 and 999.
</p>
<h3 name="Examples"> Examples </h3>
<h4 name="Example:_Using_getMilliseconds"> Example: Using <code>getMilliseconds</code> </h4>
<p>The following example assigns the milliseconds portion of the current time to the variable <code>ms</code>.
</p>
<pre>var ms;
Today = new Date();
ms = Today.getMilliseconds(); 
</pre>
<h3 name="See_Also"> See Also </h3>
<p><a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Date/getUTCMilliseconds">getUTCMilliseconds</a>,
<a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setMilliseconds">setMilliseconds</a>
</p>
<div class="noinclude">
</div>
{{ languages( { "fr": "fr/R\u00e9f\u00e9rence_de_JavaScript_1.5_Core/Objets_globaux/Date/getMilliseconds", "ja": "ja/Core_JavaScript_1.5_Reference/Global_Objects/Date/getMilliseconds", "pl": "pl/Dokumentacja_j\u0119zyka_JavaScript_1.5/Obiekty/Date/getMilliseconds" } ) }}
Revert to this revision