From a55b575e8089ee6cab7c5c262a7e6db55d0e34d6 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:46:50 +0100 Subject: unslug es: move --- .../global_objects/date/getseconds/index.html | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 files/es/web/javascript/reference/global_objects/date/getseconds/index.html (limited to 'files/es/web/javascript/reference/global_objects/date/getseconds') diff --git a/files/es/web/javascript/reference/global_objects/date/getseconds/index.html b/files/es/web/javascript/reference/global_objects/date/getseconds/index.html new file mode 100644 index 0000000000..875fe3f48b --- /dev/null +++ b/files/es/web/javascript/reference/global_objects/date/getseconds/index.html @@ -0,0 +1,83 @@ +--- +title: Date.prototype.getSeconds() +slug: Web/JavaScript/Referencia/Objetos_globales/Date/getSeconds +tags: + - Fecha + - JavaScript + - Prototipo + - Referencia + - metodo +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getSeconds +--- +
{{JSRef}}
+ +

El método getSeconds() devuelve los segundos en la fecha especificada de acuerdo a la hora local.

+ +
{{EmbedInteractiveExample("pages/js/date-getseconds.html")}}
+ + + +

Sintaxis

+ +
dateObj.getSeconds()
+ +

Valor devuelto

+ +

Un número entero, entro 0 y 59, representando los segundos en la fecha dada de acuerdo a la hora local.

+ +

Ejemplos

+ +

Utilizando getSeconds()

+ +

La segunda sentencia asigna el valor 30 a la variable seconds, en base al valor del objeto {{jsxref("Global_Objects/Date", "Date")}} Xmas95.

+ +
var Xmas95 = new Date('December 25, 1995 23:15:30');
+var seconds = Xmas95.getSeconds();
+
+console.log(seconds); // 30
+
+ +

Especificaciones

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificaciónEstadoComentario
{{SpecName('ES1')}}{{Spec2('ES1')}}Definición inicial. Implementado en JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.22', 'Date.prototype.getSeconds')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getseconds', 'Date.prototype.getSeconds')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-date.prototype.getseconds', 'Date.prototype.getSeconds')}}{{Spec2('ESDraft')}} 
+ +

Compatibilidad con navegadores

+ + + +

{{Compat("javascript.builtins.Date.getSeconds")}}

+ +

See also

+ + -- cgit v1.2.3-54-g00ecf