Return to Snippet

Revision: 1496
at October 11, 2006 19:56 by jonhenshaw


Initial Code
<script language="JavaScript">
    var d=new Date();
    yr=d.getFullYear();
    if (yr!=2002)
    document.write("-"+yr);
</script>

Initial URL

                                

Initial Description
You can use this script to always keep the copyright notice on the footer of your website current. For example, instead of having to update the year at the beginning of each year, this script will display current year. I'm sure there's an easier way of doing this, but I ran across it tonight and thought it was a clever idea. When putting it in your code, it would look something like "Copyright 2001[script goes here]"

Initial Title
Automatic Date for Footer

Initial Tags
date

Initial Language
JavaScript