(aboutMe)

I'm a hack, but a pretty good one... as hacks go, that is...

(network)

(search)


« (Using Javascript For Headers And Footers…) // (home) // (Expandable Folder Shortcuts Anywhere) »

Perpetual Copyright Date

by: havascript.com admin // March 13, 2007   ( ) {

I’m an amateur developer who has a dozen or two websites polluting cyberspace and the last thing that I want to do the first week of any new year is to spend my time FTPing copyright updates. Not updating copyright statements with the current year has the effect of having the site look unkept and could conceivably compromise your legal rights.

Consequently, I compiled this tiny Javascript to do the work for me:

<script language=”Javascript”>
// Perpetual Copyright Date
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000) year+=1900
document.write(”Copyright © 1996 - “+year+”")
</script>

The document.write statement can be edited to suit your own needs. I’ve used it on this site and can be reviewed by viewing the source.



topics: HTML, Javascript //
}

Comments

You must be logged in to post a comment.