aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/javascript/reference/global_objects/date/getminutes/index.html
blob: 0b97f5e1f7b4a5286d7e24adc0334f719f76e038 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
title: Date.prototype.getMinutes()
slug: Web/JavaScript/Reference/Global_Objects/Date/getMinutes
tags:
  - Date
  - JavaScript
  - Method
  - Prototype
  - Reference
translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMinutes
---
<div>{{JSRef("Global_Objects", "Date")}}</div>

<h2 id="Summary">Сводка</h2>

<p>Метод <strong><code>getMinutes()</code></strong> возвращает минуты указанной даты по местному времени.</p>

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

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

<h3 id="Parameters">Параметры</h3>

<p>Нет.</p>

<h3 id="Returns">Возвращаемое значение</h3>

<p>Значение, возвращённое методом <code>getMinutes()</code>, является целым числом от 0 до 59.</p>

<h2 id="Examples">Примеры</h2>

<h3 id="Example_Using_getMinutes">Пример: использование метода <code>getMinutes()</code></h3>

<p>Вторая инструкция в примере ниже присваивает значение 15 переменной <code>minutes</code> из значения объекта {{jsxref("Global_Objects/Date", "Date")}} <code>date</code>.</p>

<pre class="brush: js">let date = new Date('December 25, 1995 23:15:30');
let minutes = date.getMinutes();

console.log(minutes); // 15
</pre>

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

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Спецификация</th>
   <th scope="col">Статус</th>
   <th scope="col">Комментарии</th>
  </tr>
  <tr>
   <td>ECMAScript 1-е издание.</td>
   <td>Стандарт</td>
   <td>Изначальное определение. Реализована в JavaScript 1.0.</td>
  </tr>
  <tr>
   <td>{{SpecName('ES5.1', '#sec-15.9.5.20', 'Date.prototype.getMinutes')}}</td>
   <td>{{Spec2('ES5.1')}}</td>
   <td></td>
  </tr>
  <tr>
   <td>{{SpecName('ES6', '#sec-date.prototype.getminutes', 'Date.prototype.getMinutes')}}</td>
   <td>{{Spec2('ES6')}}</td>
   <td></td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Совместимость с браузерами</h2>

<p>{{Compat}}</p>

<h2 id="See_also">Смотрите также</h2>

<ul>
 <li>{{jsxref("Date.prototype.getUTCMinutes()")}}</li>
 <li>{{jsxref("Date.prototype.setMinutes()")}}</li>
</ul>