Create a gist now

Instantly share code, notes, and snippets.

@eliorivero /the-date.js Secret
Last active Oct 26, 2015

What would you like to do?
Display the current year
var theYear = document.createElement( 'div' );
theYear.classList.add( 'the-year' );
theYear.textContent = 'Copyright ' + new Date().getFullYear() + ' My Company.';
document.body.appendChild( theYear );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment