Date.getFullYear()
Returns the year
var moonLanding = new Date('July 20, 69 00:20:18');
console.log(moonLanding.getFullYear());
// expected output: 1969
Syntax
dateObj.getFullYear()Description
Examples
Using getFullYear()
getFullYear()References
Contributors to this page
Last updated