From cb9e359a51c3249d8f5157db69d43fd413ddeda6 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:45:12 +0100 Subject: unslug ca: move --- .../objectes_globals/date/tostring/index.html | 142 --------------------- 1 file changed, 142 deletions(-) delete mode 100644 files/ca/web/javascript/referencia/objectes_globals/date/tostring/index.html (limited to 'files/ca/web/javascript/referencia/objectes_globals/date/tostring/index.html') diff --git a/files/ca/web/javascript/referencia/objectes_globals/date/tostring/index.html b/files/ca/web/javascript/referencia/objectes_globals/date/tostring/index.html deleted file mode 100644 index 8482fe5298..0000000000 --- a/files/ca/web/javascript/referencia/objectes_globals/date/tostring/index.html +++ /dev/null @@ -1,142 +0,0 @@ ---- -title: Date.prototype.toString() -slug: Web/JavaScript/Referencia/Objectes_globals/Date/toString -translation_of: Web/JavaScript/Reference/Global_Objects/Date/toString ---- -
{{JSRef}}
- -

El mètode toString() retorna un string que representa l'objecte {{jsxref("Date")}} especificat.

- -

Sintaxi

- -
objecteDate.toString()
- -

Paràmetres

- -

Cap.

- -

Descripció

- -

L'objecte {{jsxref("Date")}} sobreescriu el mètode toString() de l'objecte {{jsxref("Object")}}; no hereta {{jsxref("Object.prototype.toString()")}}. Per a objectes {{jsxref("Date")}}, el mètode toString() retorna un string que representa l'objecte.

- -

El mètode toString() sempre retorna una representació en forma de string de la data en anglés americà.

- -

JavaScript cridarà el mètode toString() de manera automàtica quan una data requereix ser representada com a text o bé quan una data formi part d'una concatenació de strings.

- -

El mètode toString() és genèric. Si this no fa referència a una instància de {{jsxref("Date")}}, retornarà "Invalid Date".

- -

Exemples

- -

Utilitzar toString()

- -

L'exemple següent assigna el valor de toString() d'un objecte {{jsxref("Date")}} a myVar:

- -
var x = new Date();
-myVar = x.toString(); // assigna un valor a myVar simimlar a:
-// Mon Sep 28 1998 14:36:22 GMT-0700 (Pacific Daylight Time)
-
- -

Especificacions

- - - - - - - - - - - - - - - - - - - - - - - - -
EspecificacióEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.9.5.2', 'Date.prototype.toLocaleTimeString')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.tostring', 'Date.prototype.toString')}}{{Spec2('ES6')}} 
- -

Compatibilitat amb navegadors

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
Mètode genèric{{CompatUnknown}}{{CompatGeckoDesktop("41")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
Mètode genèric{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("41")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

Vegeu també

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