Skip to content

Instantly share code, notes, and snippets.

@eliorivero
Last active October 26, 2015 04:22
Show Gist options
  • Save eliorivero/c79a2952227caae033e2 to your computer and use it in GitHub Desktop.
Save eliorivero/c79a2952227caae033e2 to your computer and use it in GitHub Desktop.
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