I am trying to come up with a function that will display the full 4 digit year inside of a footer div. I know how to do it with document.write getFullYear() call but i need to apply it in a function.
I need to create this as a function that will be placed in an external js file. It will need to be called on several pages within the company website.
My line of thinking is this:
[code=html]<script language="JavaScript" type="text/javascript"> function copyDate(){ now = new Date theYear=now.getYear() if (theYear < 1900) theYear=theYear+1900 document.write(theYear) } </script>