JavaScript Date getUTCFullYear()

The JavaScript date getUTCFullYear() method is used to get the integer value that represents the year on the basis of universal time.

Syntax:

dateObj.getUTCFullYear()

Return:
An integer value that represents a year.

Example:

<!DOCTYPE html>
<html>
<body>
<script>
var today = new Date();
document.writeln(today.getUTCFullYear());
</script>
</body>
</html>