aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/javascript/reference/global_objects/date/getfullyear/index.md
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-08-03 08:03:09 +0200
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-09-03 08:08:25 +0200
commit844f5103992238c0c23203286dad16a466e89c97 (patch)
treed537708951bb2b61be8192ffacc05a0ce6804f89 /files/fr/web/javascript/reference/global_objects/date/getfullyear/index.md
parenta70fd5b73ecb10bec3906640023e2a1a46e118a2 (diff)
downloadtranslated-content-844f5103992238c0c23203286dad16a466e89c97.tar.gz
translated-content-844f5103992238c0c23203286dad16a466e89c97.tar.bz2
translated-content-844f5103992238c0c23203286dad16a466e89c97.zip
move *.html to *.md
Diffstat (limited to 'files/fr/web/javascript/reference/global_objects/date/getfullyear/index.md')
-rw-r--r--files/fr/web/javascript/reference/global_objects/date/getfullyear/index.md81
1 files changed, 81 insertions, 0 deletions
diff --git a/files/fr/web/javascript/reference/global_objects/date/getfullyear/index.md b/files/fr/web/javascript/reference/global_objects/date/getfullyear/index.md
new file mode 100644
index 0000000000..16d862b7e3
--- /dev/null
+++ b/files/fr/web/javascript/reference/global_objects/date/getfullyear/index.md
@@ -0,0 +1,81 @@
+---
+title: Date.prototype.getFullYear()
+slug: Web/JavaScript/Reference/Global_Objects/Date/getFullYear
+tags:
+ - Date
+ - JavaScript
+ - Méthode
+ - Prototype
+ - Reference
+translation_of: Web/JavaScript/Reference/Global_Objects/Date/getFullYear
+original_slug: Web/JavaScript/Reference/Objets_globaux/Date/getFullYear
+---
+<div>{{JSRef}}</div>
+
+<p>La méthode <code><strong>getFullYear()</strong></code> renvoie l'année de la date renseignée d'après l'heure locale.</p>
+
+<p>Cette méthode doit être utilisée à la place de {{jsxref("Date.prototype.getYear()", "getYear()")}}.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/date-getfullyear.html")}}</div>
+
+<h2 id="Syntaxe">Syntaxe</h2>
+
+<pre class="syntaxbox">dateObj.getFullYear()</pre>
+
+<h3 id="Valeur_de_retour">Valeur de retour</h3>
+
+<p>Un entier correspondant à l'année de la date selon l'heure locale.</p>
+
+<h2 id="Exemples">Exemples</h2>
+
+<h3 id="Utiliser_getFullYear()">Utiliser <code>getFullYear()</code></h3>
+
+<p>L'exemple qui suit assigne la valeur à quatre chiffres de l'année courante à la variable <code>année</code>.</p>
+
+<pre class="brush: js">var aujd = new Date();
+var année = aujd.getFullYear();
+</pre>
+
+<h2 id="Spécifications">Spécifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Spécification</th>
+ <th scope="col">État</th>
+ <th scope="col">Commentaires</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>Définition initiale. Implémentée avec JavaScript 1.3.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.9.5.10', 'Date.prototype.getFullYear')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-date.prototype.getfullyear', 'Date.prototype.getFullYear')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-date.prototype.getfullyear', 'Date.prototype.getFullYear')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
+
+<p>{{Compat("javascript.builtins.Date.getFullYear")}}</p>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<ul>
+ <li>{{jsxref("Date.prototype.getUTCFullYear()")}}</li>
+ <li>{{jsxref("Date.prototype.setFullYear()")}}</li>
+ <li>{{jsxref("Date.prototype.getYear()")}}</li>
+</ul>