Created
January 28, 2013 19:01
-
-
Save longjasonm/4658095 to your computer and use it in GitHub Desktop.
Shortest way to print current year in Javascript; for use in web pages footers. Source: http://stackoverflow.com/questions/4562587/shortest-way-to-print-current-year-in-javascript
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
<script>document.write(new Date().getFullYear())</script> | |
<!-- Example Code --> | |
<span>© 2000–<script>document.write(new Date().getFullYear())</script> Your Company Name</span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment