aboutsummaryrefslogtreecommitdiff
path: root/files/uk/web/javascript/reference/global_objects/date/getmilliseconds/index.html
blob: bef2c69b6de872ac27f4ab7e49b4718221a8a5e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
title: Date.prototype.getMilliseconds()
slug: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds
tags:
  - Date
  - JavaScript
  - Довідка
  - метод
translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds
---
<div>{{JSRef}}</div>

<p>Метод <strong><code>getMilliseconds()</code></strong> повертає мілісекунди у вказаній даті згідно з місцевим часом.</p>

<div>{{EmbedInteractiveExample("pages/js/date-getmilliseconds.html","shorter")}}</div>



<h2 id="Синтаксис">Синтаксис</h2>

<pre class="syntaxbox notranslate"><code><var>dateObj</var>.getMilliseconds()</code></pre>

<h3 id="Повертає">Повертає</h3>

<p>Число між 0 та 999, що відображає мілісекунди для наданої дати згідно з місцевим часом.</p>

<h2 id="Приклади">Приклади</h2>

<h3 id="Використання_getMilliseconds">Використання <code>getMilliseconds()</code></h3>

<p>Наступний приклад присвоює значення мілісекунд поточного часу змінній <code>milliseconds</code>:</p>

<pre class="brush: js notranslate">var today = new Date();
var milliseconds = today.getMilliseconds();
</pre>

<h2 id="Специфікації">Специфікації</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Специфікація</th>
  </tr>
  <tr>
   <td>{{SpecName('ESDraft', '#sec-date.prototype.getmilliseconds', 'Date.prototype.getMilliseconds')}}</td>
  </tr>
 </tbody>
</table>

<h2 id="Сумісність_з_веб-переглядачами">Сумісність з веб-переглядачами</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.getMilliseconds")}}</p>

<h2 id="Див._також">Див. також</h2>

<ul>
 <li>{{jsxref("Date.prototype.getUTCMilliseconds()")}}</li>
 <li>{{jsxref("Date.prototype.setMilliseconds()")}}</li>
</ul>