From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- .../objectes_globals/date/getseconds/index.html | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 files/ca/web/javascript/referencia/objectes_globals/date/getseconds/index.html (limited to 'files/ca/web/javascript/referencia/objectes_globals/date/getseconds') diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/getseconds/index.html b/files/ca/web/javascript/referencia/objectes_globals/date/getseconds/index.html new file mode 100644 index 0000000000..790c62e3e9 --- /dev/null +++ b/files/ca/web/javascript/referencia/objectes_globals/date/getseconds/index.html @@ -0,0 +1,120 @@ +--- +title: Date.prototype.getSeconds() +slug: Web/JavaScript/Referencia/Objectes_globals/Date/getSeconds +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getSeconds +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

Resum

+ +

El mètode getSeconds() retorna els segons de la data especficada d'acord al temps local.

+ +

Sintaxi

+ +
dateObj.getSeconds()
+ +

Paràmetres

+ +

Cap.

+ +

Retorna

+ +

El valor retornat per getSeconds() és un sencer entre 0 i 59.

+ +

Exemples

+ +

Exemple: Utilitzar getSeconds()

+ +

La segona sentència de sota assigna el valor 30 a la variable segons, basat en el valor de l'objecte nadal95, de tipus {{jsxref("Global_Objects/Date", "Date")}}.

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

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
ECMAScript 1a Edició.StandardDefinició inicial. Implementat a 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')}} 
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

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