aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/javascript/reference/global_objects/date/getutchours/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-br/web/javascript/reference/global_objects/date/getutchours/index.html')
-rw-r--r--files/pt-br/web/javascript/reference/global_objects/date/getutchours/index.html63
1 files changed, 63 insertions, 0 deletions
diff --git a/files/pt-br/web/javascript/reference/global_objects/date/getutchours/index.html b/files/pt-br/web/javascript/reference/global_objects/date/getutchours/index.html
new file mode 100644
index 0000000000..7f962f722e
--- /dev/null
+++ b/files/pt-br/web/javascript/reference/global_objects/date/getutchours/index.html
@@ -0,0 +1,63 @@
+---
+title: Date.prototype.getUTCHours()
+slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCHours
+tags:
+ - Date
+ - JavaScript
+ - Prototipo
+ - Prototype
+ - Referencia
+ - metodo
+translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCHours
+---
+<div>{{JSRef}}</div>
+
+<div>O método <strong><code>getUTCHours()</code></strong> retorna o número de horas na data especificada de acordo com o horário universal (UTC).</div>
+
+<p>{{EmbedInteractiveExample("pages/js/date-getutchours.html")}}</p>
+
+
+
+<h2 id="Sintaxe">Sintaxe</h2>
+
+<pre class="syntaxbox notranslate"><code><var>dateObj</var>.getUTCHours()</code></pre>
+
+<h3 id="Valor_retornado">Valor retornado</h3>
+
+<p>Um número inteiro, entre 0 e 23, representando as horas em uma data de acordo com o horário universal (UTC).</p>
+
+<h2 id="Exemplos">Exemplos</h2>
+
+<h3 id="Usando_getUTCHours">Usando <code>getUTCHours()</code></h3>
+
+<p>O exemplo a seguir atribui a porção de horas do horário corrente à variável <code>hours</code>.</p>
+
+<pre class="brush: js notranslate">var today = new Date();
+var hours = today.getUTCHours();
+</pre>
+
+<h2 id="Especificações">Especificações</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificação</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-date.prototype.getutchours', 'Date.prototype.getUTCHours')}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilidade_do_navegador">Compatibilidade do navegador</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.getUTCHours")}}</p>
+
+<h2 id="Veja_também">Veja também</h2>
+
+<ul>
+ <li>{{jsxref("Date.prototype.getHours()")}}</li>
+ <li>{{jsxref("Date.prototype.setUTCHours()")}}</li>
+</ul>