Skip to content

Instantly share code, notes, and snippets.

@geog4046instructor
Last active March 30, 2017 00:20
Show Gist options
  • Save geog4046instructor/2afd2b11ab8813aff6e02c78251c011d to your computer and use it in GitHub Desktop.
Save geog4046instructor/2afd2b11ab8813aff6e02c78251c011d to your computer and use it in GitHub Desktop.
Insert the current year into a page
/* Print the year in the format YYYY between any HTML tags with class="current-year"
*/
var currentYear = new Date().getFullYear()
jQuery( ".current-year" ).text( currentYear )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment