diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
commit | 074785cea106179cb3305637055ab0a009ca74f2 (patch) | |
tree | e6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pt-br/web/javascript/reference/global_objects/date/setutcseconds/index.html | |
parent | da78a9e329e272dedb2400b79a3bdeebff387d47 (diff) | |
download | translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2 translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip |
initial commit
Diffstat (limited to 'files/pt-br/web/javascript/reference/global_objects/date/setutcseconds/index.html')
-rw-r--r-- | files/pt-br/web/javascript/reference/global_objects/date/setutcseconds/index.html | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/files/pt-br/web/javascript/reference/global_objects/date/setutcseconds/index.html b/files/pt-br/web/javascript/reference/global_objects/date/setutcseconds/index.html new file mode 100644 index 0000000000..2876f9a69b --- /dev/null +++ b/files/pt-br/web/javascript/reference/global_objects/date/setutcseconds/index.html @@ -0,0 +1,78 @@ +--- +title: Date.prototype.setUTCSeconds() +slug: Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds +tags: + - Date + - JavaScript + - Method + - Prototipo + - Prototype + - Referencia + - data + - metodo +translation_of: Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds +--- +<div>{{JSRef}}</div> + +<p>O método <strong><code>setUTCSeconds()</code></strong> atribui os segundos para a data especificada de acordo com o horário universal.</p> + +<div>{{EmbedInteractiveExample("pages/js/date-setutcseconds.html")}}</div> + + + +<h2 id="Sintaxe">Sintaxe</h2> + +<pre class="syntaxbox notranslate"><code><var>dateObj</var>.setUTCSeconds(<var>secondsValue</var>[, <var>msValue</var>])</code></pre> + +<h3 id="Parâmetros">Parâmetros</h3> + +<dl> + <dt><code>secondsValue</code></dt> + <dd>Um inteiro entre 0 e 59, representando os segundos.</dd> + <dt><code>msValue</code></dt> + <dd>Opcional. Um número entre 0 e 999, representando os milissegundos.</dd> +</dl> + +<h3 id="Valor_de_retorno">Valor de retorno</h3> + +<p>O número de milissegundos entre 1 de Janeiro de 1970 00:00:00 UTC e a data atualizada.</p> + +<h2 id="Descrição">Descrição</h2> + +<p>Se você não especifica o parâmetro <code>msValue</code>, o valor retornado pelo método {{jsxref("Date.prototype.getUTCMilliseconds()", "getUTCMilliseconds()")}} é utilizado.</p> + +<p>Se o parâmetro que você especificou está fora do alcance esperado, <code>setUTCSeconds()</code> tentará atualizar a informação da data no objeto {{jsxref("Date")}}. Por exemplo, se você usar 100 para <code>secondsValue</code>, os minutos guardados no objeto {{jsxref("Date")}} irá ser incrementado em 1, e 40 será usado para os segundos.</p> + +<h2 id="Exemplos">Exemplos</h2> + +<h3 id="Usando_setUTCSeconds">Usando <code>setUTCSeconds()</code></h3> + +<pre class="brush: js notranslate">var theBigDay = new Date(); +theBigDay.setUTCSeconds(20); +</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.setutcseconds', 'Date.prototype.setUTCSeconds')}}</td> + </tr> + </tbody> +</table> + +<h2 id="Compatibilidade_de_navegador">Compatibilidade de 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.setUTCSeconds")}}</p> + +<h2 id="Veja_também">Veja também</h2> + +<ul> + <li>{{jsxref("Date.prototype.getUTCSeconds()")}}</li> + <li>{{jsxref("Date.prototype.setSeconds()")}}</li> +</ul> |