From 39f2114f9797eb51994966c6bb8ff1814c9a4da8 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:36:08 +0100 Subject: unslug fr: move --- .../global_objects/date/getseconds/index.html | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 files/fr/web/javascript/reference/global_objects/date/getseconds/index.html (limited to 'files/fr/web/javascript/reference/global_objects/date/getseconds') diff --git a/files/fr/web/javascript/reference/global_objects/date/getseconds/index.html b/files/fr/web/javascript/reference/global_objects/date/getseconds/index.html new file mode 100644 index 0000000000..1d6ed36ad0 --- /dev/null +++ b/files/fr/web/javascript/reference/global_objects/date/getseconds/index.html @@ -0,0 +1,83 @@ +--- +title: Date.prototype.getSeconds() +slug: Web/JavaScript/Reference/Objets_globaux/Date/getSeconds +tags: + - Date + - JavaScript + - Méthode + - Prototype + - Reference +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getSeconds +--- +
{{JSRef}}
+ +

La méthode getSeconds() renvoie les secondes pour la date renseignée d'après l'heure locale.

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

Syntaxe

+ +
dateObj.getSeconds()
+ +

Valeur de retour

+ +

La valeur renvoyée par getSeconds() est un entier entre 0 et 59 correspondant au nombre de secondes pour la date donnée selon l'heure locale.

+ +

Exemples

+ +

Utiliser getSeconds()

+ +

La seconde instruction ci-dessous assigne la valeur 30 à la variable secondes, selon la valeur de l'objet {{jsxref("Date")}} noel95.

+ +
var noel95 = new Date("December 25, 1995 23:15:30");
+var secondes = noel95.getSeconds();
+
+console.log(secondes); //30
+
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('ES1')}}{{Spec2('ES1')}}Définition initiale. Implémentée avec 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')}} 
+ +

Compatibilité des navigateurs

+ + + +

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

+ +

Voir aussi

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