Article written

  • on 04.01.2010
  • at 01:08 PM
  • by Danny

Make a Dynamic Copyright Date with JavaScript 2

Jan4

I recently read a tweet from another designer reminding everyone to update the copyright date on the footer of their website. This reminded me that I cobbled together a little JavaScript last year that will automatically display the current year so you’ll never have to manually change it. Here’s the code:

&copy; <script type="text/javascript">var theDate=new Date(); document.write(theDate.getFullYear())</script> dannyhouk

Just replace my name in the code with your site name and that’s it. Just a little New Years tip for y’all.

subscribe to comments RSS

There are 2 comments for this post

  1. Nice script- probably help a lot on my site. Nice New Years tip.
    ~~~ sharnon ~~~

  2. Danny says:

    Thanks Sharnon :)

Please, feel free to post your own comment

* these are required fields

© danny houk is on the WordPress bandwagon with an adapated theme.