diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:43:23 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:43:23 -0500 |
| commit | 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (patch) | |
| tree | a9ef8ac1e1b8fe4207b6d64d3841bfb8990b6fd0 /files/uk/web/javascript/reference/global_objects/date/getutcfullyear | |
| parent | 074785cea106179cb3305637055ab0a009ca74f2 (diff) | |
| download | translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.gz translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.bz2 translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.zip | |
initial commit
Diffstat (limited to 'files/uk/web/javascript/reference/global_objects/date/getutcfullyear')
| -rw-r--r-- | files/uk/web/javascript/reference/global_objects/date/getutcfullyear/index.html | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/files/uk/web/javascript/reference/global_objects/date/getutcfullyear/index.html b/files/uk/web/javascript/reference/global_objects/date/getutcfullyear/index.html new file mode 100644 index 0000000000..04416642dc --- /dev/null +++ b/files/uk/web/javascript/reference/global_objects/date/getutcfullyear/index.html @@ -0,0 +1,65 @@ +--- +title: Date.prototype.getUTCFullYear() +slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear +tags: + - Date + - JavaScript + - Довідка + - метод +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear +--- +<div>{{JSRef}}</div> + +<p>Метод <strong><code>getUTCFullYear()</code></strong> повертає рік у вказаній даті згідно з всесвітнім часом.</p> + +<div>{{EmbedInteractiveExample("pages/js/date-getutcfullyear.html")}}</div> + + + +<h2 id="Синтаксис">Синтаксис</h2> + +<pre class="syntaxbox notranslate"><code><var>dateObj</var>.getUTCFullYear()</code></pre> + +<h3 id="Повертає">Повертає</h3> + +<p>Число, що відображає рік у вказаній даті згідно з всесвітнім часом.</p> + +<h2 id="Опис">Опис</h2> + +<p>Значення, яке повертає <code>getUTCFullYear()</code>, є абсолютним числом, сумісним з 2000-м роком, наприклад, 1995.</p> + +<h2 id="Приклади">Приклади</h2> + +<h3 id="Використання_getUTCFullYear">Використання <code>getUTCFullYear()</code></h3> + +<p>Наступний приклад присвоює чотиризначне значення поточного року змінній <code>year</code>.</p> + +<pre class="brush: js notranslate">var today = new Date(); +var year = today.getUTCFullYear(); +</pre> + +<h2 id="Специфікації">Специфікації</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Специфікація</th> + </tr> + <tr> + <td>{{SpecName('ESDraft', '#sec-date.prototype.getutcfullyear', 'Date.prototype.getUTCFullYear')}}</td> + </tr> + </tbody> +</table> + +<h2 id="Сумісність_з_веб-переглядачами">Сумісність з веб-переглядачами</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("javascript.builtins.Date.getUTCFullYear")}}</p> + +<h2 id="Див._також">Див. також</h2> + +<ul> + <li>{{jsxref("Date.prototype.getFullYear()")}}</li> + <li>{{jsxref("Date.prototype.setFullYear()")}}</li> +</ul> |
