blob: 4e63c74189e7deb5c154bb4ef2be8e4f24c361f3 (
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
|
---
title: Date.prototype.getUTCHours()
slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCHours
translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCHours
browser-compat: javascript.builtins.Date.getUTCHours
---
<div>{{JSRef}}</div>
<p>getUTCHours () 메서드는 표준시에 따라 지정된 날짜의 시간을 반환합니다.</p>
<h2 id="Syntax">Syntax</h2>
<pre class="syntaxbox"><code><var>dateObj</var>.getUTCHours()</code></pre>
<h3 id="Return_value">Return value</h3>
<p>0부터 23까지의 정수로, 표준시에 따라 지정된 날짜의 시간을 나타냅니다.</p>
<h2 id="Examples">Examples</h2>
<h3 id="Using_getUTCHours()">Using <code>getUTCHours()</code></h3>
<p>다음 예제에서는 현재 시간의 시간 부분을 시간 변수로 지정합니다.</p>
<pre class="brush: js">var today = new Date();
var hours = today.getUTCHours();
</pre>
<h2 id="specifications">명세</h2>
<p>{{Specifications}}</p>
<h2 id="browser_compatibility">브라우저 호환성</h2>
<p>{{Compat}}</p>
<h2 id="See_also">See also</h2>
<ul>
<li>{{jsxref("Date.prototype.getHours()")}}</li>
<li>{{jsxref("Date.prototype.setUTCHours()")}}</li>
</ul>
|