aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/javascript/reference/global_objects/date/setmilliseconds/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-br/web/javascript/reference/global_objects/date/setmilliseconds/index.html')
-rw-r--r--files/pt-br/web/javascript/reference/global_objects/date/setmilliseconds/index.html74
1 files changed, 74 insertions, 0 deletions
diff --git a/files/pt-br/web/javascript/reference/global_objects/date/setmilliseconds/index.html b/files/pt-br/web/javascript/reference/global_objects/date/setmilliseconds/index.html
new file mode 100644
index 0000000000..f632e02bf9
--- /dev/null
+++ b/files/pt-br/web/javascript/reference/global_objects/date/setmilliseconds/index.html
@@ -0,0 +1,74 @@
+---
+title: Date.prototype.setMilliseconds()
+slug: Web/JavaScript/Reference/Global_Objects/Date/setMilliseconds
+tags:
+ - Date
+ - JavaScript
+ - Method
+ - Prototipo
+ - Prototype
+ - Referencia
+ - data
+ - metodo
+translation_of: Web/JavaScript/Reference/Global_Objects/Date/setMilliseconds
+---
+<div>{{JSRef}}</div>
+
+<p>O método <strong><code>setMilliseconds()</code></strong> atribui os milissegundos para a data específica de acordo com a hora local.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/date-setmilliseconds.html")}}</div>
+
+
+
+<h2 id="Sintaxe">Sintaxe</h2>
+
+<pre class="syntaxbox notranslate"><code><var>dateObj</var>.setMilliseconds(<var>millisecondsValue</var>)</code></pre>
+
+<h3 id="Parâmetros">Parâmetros</h3>
+
+<dl>
+ <dt><code>millisecondsValue</code></dt>
+ <dd>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 dia 1 de Janeiro de 1970 00:00:00 UTC e a data atualizada.</p>
+
+<h2 id="Descrição">Descrição</h2>
+
+<p>Se você especifica um número fora do alcance esperado, a informação de data no objeto {{jsxref("Date")}} é atualizado de acordo. Por exemplo, se você especifica 1005, o número de segundos é incrementado em 1, e 5 é utilizado para os milissegundos.</p>
+
+<h2 id="Exemplos">Exemplos</h2>
+
+<h3 id="Usando_setMilliseconds">Usando <code>setMilliseconds()</code></h3>
+
+<pre class="brush: js notranslate">var theBigDay = new Date();
+theBigDay.setMilliseconds(100);
+</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.setmilliseconds', 'Date.prototype.setMilliseconds')}}</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.setMilliseconds")}}</p>
+
+<h2 id="Veja_também">Veja também</h2>
+
+<ul>
+ <li>{{jsxref("Date.prototype.getMilliseconds()")}}</li>
+ <li>{{jsxref("Date.prototype.setUTCMilliseconds()")}}</li>
+</ul>