blob: 7cd94700034ee419cdd44cfd34c81c8a5bb1d7a0 (
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.getMinutes()
slug: Web/JavaScript/Reference/Global_Objects/Date/getMinutes
tags:
- Date
- JavaScript
- Довідка
- метод
translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMinutes
---
<div>{{JSRef}}</div>
<p>Метод <strong><code>getMinutes()</code></strong> повертає хвилини у вказаній даті згідно з місцевим часом.</p>
<div>{{EmbedInteractiveExample("pages/js/date-getminutes.html","shorter")}}</div>
<h2 id="Синтаксис">Синтаксис</h2>
<pre class="syntaxbox notranslate"><code><var>dateObj</var>.getMinutes()</code></pre>
<h3 id="Повертає">Повертає</h3>
<p>Ціле число між 0 та 59, що відображає хвилини у наданій даті згідно з місцевим часом.</p>
<h2 id="Приклади">Приклади</h2>
<h3 id="Використання_getMinutes">Використання <code>getMinutes()</code></h3>
<p>Друга інструкція, наведена нижче, присвоює 15 змінній <code>minutes</code> на основі значення об'єкта {{jsxref("Global_Objects/Date", "Date")}} на ім'я <code>Xmas95</code>.</p>
<pre class="brush: js notranslate">var Xmas95 = new Date('December 25, 1995 23:15:30');
var minutes = Xmas95.getMinutes();
console.log(minutes); // 15
</pre>
<h2 id="Специфікації">Специфікації</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Специфікація</th>
</tr>
<tr>
<td>{{SpecName('ESDraft', '#sec-date.prototype.getminutes', 'Date.prototype.getMinutes')}}</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.getMinutes")}}</p>
<h2 id="Див._також">Див. також</h2>
<ul>
<li>{{jsxref("Date.prototype.getUTCMinutes()")}}</li>
<li>{{jsxref("Date.prototype.setMinutes()")}}</li>
</ul>
|