Click to See Complete Forum and Search --> : Correct year for the copyright notice


spuddy
01-06-2003, 05:11 PM
Hi,
Does anyone know of a script that will automatically change the year for the copyright on my web pages?

Colour Box (http://www.doncaster40.freeserve.co.uk/index.html)

AdamBrill
01-06-2003, 05:19 PM
Hi!

Try this:

<script language=javascript>
year=Date().split(' ');
document.write("(c) "+year[4]+" Whoever inc.");
</script>

Charles
01-06-2003, 05:26 PM
Or more succinctly:

<script type="text/javascript">
<!--
document.write('<p>&amp;copy;', new Date().getFullYear(), ' Whoever inc.</p>');
// -->
</script>