aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/javascript/reference/global_objects/date/getutcseconds/index.html
blob: 7ac9f173e5bb02b13ef6686f9a52377f90024991 (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
---
title: Date.prototype.getUTCSeconds()
slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds
translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds
---
<div>{{JSRef}}</div>

<p>O método <strong><code>getUTCSeconds()</code></strong> retorna os segundos na data informada de acordo com a hora universal.</p>

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

<h2 id="Sintaxe">Sintaxe</h2>

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

<h3 id="Valor_de_retorno">Valor de retorno</h3>

<p>Um número inteiro, entre 0 e 59, representando os segundos da data informada de acordo com a hora universal.</p>

<h2 id="Exemplos">Exemplos</h2>

<h3 id="Usando_getUTCSeconds()">Usando <code>getUTCSeconds()</code></h3>

<p>The following example assigns the seconds portion of the current time to the variabl</p>

<p>O exemplo a seguir atribui a parte dos segundos da hora atual à variável <code>seconds</code>.</p>

<pre class="brush: js">var today = new Date();
var seconds = today.getUTCSeconds();
</pre>

<h2 id="Especificações">Especificações</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Especificação</th>
   <th scope="col">Estado</th>
   <th scope="col">Comentário</th>
  </tr>
  <tr>
   <td>{{SpecName('ES1')}}</td>
   <td>{{Spec2('ES1')}}</td>
   <td>Definição inicial. Implementado no JavaScript 1.3.</td>
  </tr>
  <tr>
   <td>{{SpecName('ES5.1', '#sec-15.9.5.23', 'Date.prototype.getUTCSeconds')}}</td>
   <td>{{Spec2('ES5.1')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('ES6', '#sec-date.prototype.getutcseconds', 'Date.prototype.getUTCSeconds')}}</td>
   <td>{{Spec2('ES6')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('ESDraft', '#sec-date.prototype.getutcseconds', 'Date.prototype.getUTCSeconds')}}</td>
   <td>{{Spec2('ESDraft')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Compatibilidade com navegadores</h2>

<p>{{Compat("javascript.builtins.Date.getUTCSeconds")}}</p>

<h2 id="Veja_também">Veja também</h2>

<ul>
 <li>{{jsxref("Date.prototype.getSeconds()")}}</li>
 <li>{{jsxref("Date.prototype.setUTCSeconds()")}}</li>
</ul>