var today = new Date();
var year = today.getFullYear();

document.write(year);
