From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- .../global_objects/date/todatestring/index.html | 116 --------------------- 1 file changed, 116 deletions(-) delete mode 100644 files/ca/web/javascript/reference/global_objects/date/todatestring/index.html (limited to 'files/ca/web/javascript/reference/global_objects/date/todatestring/index.html') diff --git a/files/ca/web/javascript/reference/global_objects/date/todatestring/index.html b/files/ca/web/javascript/reference/global_objects/date/todatestring/index.html deleted file mode 100644 index 8be13b94d5..0000000000 --- a/files/ca/web/javascript/reference/global_objects/date/todatestring/index.html +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: Date.prototype.toDateString() -slug: Web/JavaScript/Reference/Global_Objects/Date/toDateString -translation_of: Web/JavaScript/Reference/Global_Objects/Date/toDateString -original_slug: Web/JavaScript/Referencia/Objectes_globals/Date/toDateString ---- -
{{JSRef}}
- -

El mètode toDateString() retorna la part de la data d'un objecte {{jsxref("Date")}} en un format entenible per persones en anglés amerià.

- -

Sintaxi

- -
objecteData.toDateString()
- -

Descripció

- -

Les instàncies de Date representen un punt específic en el temps. Una crida al mètode toString() retornarà la dada en un format entenible per persones, en anglés americà. Al motor SpiderMonkey, aquest format consisteix en la part de la data (dia, mes i any) seguida de la part de l'hora (hores, minuts, segons i zona horària). De vegades és convenient obtenir un string només de la part de l'hora; aquesta és la raó de ser del mètode toDateString().

- -

El mètode toDateString() resulta especialment útil perquè els motors que compleixen amb el standard ECMA-262 poden retornar resultats diferents al string obtingut mitjançant el mètode toString() en objectes Date, ja que el format depèn totalment de la implementació; això implica que partir el string per a obtenir només la part de temps pot no produïr un resultat consistent en tots els motors.

- -

Exemples

- -

Ús bàsic de toDateString()

- -
var d = new Date(1993, 6, 28, 14, 39, 7);
-
-console.log(d.toString());     // imprimeix Wed Jul 28 1993 14:39:07 GMT-0600 (PDT)
-console.log(d.toDateString()); // imprimeix Wed Jul 28 1993
-
- -

Especificacions

- - - - - - - - - - - - - - - - - - - - - - - - -
EspecificacióEstatComentaris
{{SpecName('ES3')}}{{Spec2('ES3')}}Definició inicial.
{{SpecName('ES5.1', '#sec-15.9.5.3', 'Date.prototype.toDateString')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.todatestring', 'Date.prototype.toDateString')}}{{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