John Crumpton

Archive for the ‘code’ tag

This is a handy piece of javascript code that adds the last two digits of the current year to the footer of a website. This saves time as you don’t have to keep updating the footer on all your pages.

&copy; Company name 2000&ndash;<script type="text/javascript">
<!--
var now = (new Date().getFullYear()).toString();
var theYear = now.substring(now.length, 2);
document.writeln(theYear,".");
// -->
</script>


© Company name 2000–