Last active
March 30, 2017 00:20
-
-
Save geog4046instructor/2afd2b11ab8813aff6e02c78251c011d to your computer and use it in GitHub Desktop.
Insert the current year into a page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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