Get to know MDN better
Esta página ha sido traducida del inglés por la comunidad. Aprende más y únete a la comunidad de MDN Web Docs.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since julio de 2015.
El método getUTCFullYear() devuelve el año en la fecha especificada en tiempo universal.
Un número que representa el año en la fecha representada por el objectoFecha en tiempo universal.
El valor devuelto por getUTCFullYear() es un número que no está afectado por el efecto año 2000, por ejemplo, 1995.
El siguiente ejemplo asigna el valor de cuatro digitos del año actual a la variable year.
| ECMAScript® 2027 Language Specification # sec-date.prototype.getutcfullyear |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 3 ago 2023 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.