CodesJava

Easy learning with example program codes

JavaScript JS Date getUTCFullYear() method


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()

Example:

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

Output:

2019
Please follow and like us:


Copyright © 2019 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki