Displaying a year in a webpage

  • Avatar

    Posted: 15 October 2007 01:43 AM

    Although I’ve been maintaining a website for the last five-six years, I’m a web-designer boofhead.

    I just noticed that the copyright line in the footer has a static year in it. There must be an easy-enough way to put the current year in there (javascript, probably). I’ve been googling and not come up with anything that’s less than about thirty lines of code, which I thought was over-egging the pudding.

    Is there an easier way?

    Ta,
    L

    Signature

    Laurie Fleming - the singing geek

    @LaurieFleming

         
  • Avatar

    Posted: 29 October 2007 09:18 PM #1

    deleted

    I deleted this post, better code in another

    Signature

    “Works of art, in my opinion, are the only objects in the material universe to possess internal order, and that is why, though I don’t believe that only art matters, I do believe in Art for Art’s sake.” E. M. Forster

         
  • Avatar

    Posted: 30 October 2007 11:52 AM #2

    Another deleted

    see the other post

    Signature

    “Works of art, in my opinion, are the only objects in the material universe to possess internal order, and that is why, though I don’t believe that only art matters, I do believe in Art for Art’s sake.” E. M. Forster

         
  • Avatar

    Posted: 30 October 2007 12:30 PM #3

    Got it, here is the script

    Thanks to some guy name Guy at ttp://csscreator.com/node/4922

    I modified his code to put a copyright notice + year on a single line. Copy the code below into the source code of your web page where you want the copyright notice to appear:

    Copyright ©
      [removed]
    var theDate=new Date()
    [removed](theDate.getFullYear())
    [removed]
        Laurie the Singing Geek, the Antipode, all rights reserved

    Now Laurie I want to thank you. Yesterday afternoon I decided to kill my cable TV service and get back to basics, if not BASIC. So last night instead of watching premium channels on digital TV I started to surf the web for a direction. I saw Laurie’s post and decided that was something I could do. As I have said I am more of an artist than a tech/coder, but these days you need to be a bit of both.

    Signature

    “Works of art, in my opinion, are the only objects in the material universe to possess internal order, and that is why, though I don’t believe that only art matters, I do believe in Art for Art’s sake.” E. M. Forster

         
  • Avatar

    Posted: 31 October 2007 01:21 AM #4

    Thank you! I’m going to give it a go in the weekend.

    As a point of clarification, I am not Laura, nor, by extension, a woman.

    In countries outside the US, Laurie is predominantly a male name…

    raspberry

    Signature

    Laurie Fleming - the singing geek

    @LaurieFleming

         
  • Avatar

    Posted: 31 October 2007 06:25 AM #5

    [quote author=“LaurieF”]
    As a point of clarification, I am not Laura, nor, by extension, a woman.

    In countries outside the US, Laurie is predominantly a male name…

    raspberry

    Yes, I caught that yesterday and edited my posts, but I missed a few.

    Notice how many people have viewed this thread, about 120.

    Signature

    “Works of art, in my opinion, are the only objects in the material universe to possess internal order, and that is why, though I don’t believe that only art matters, I do believe in Art for Art’s sake.” E. M. Forster

         
  • Avatar

    Posted: 03 November 2007 08:21 PM #6

    Excellent - thank you - even Tom Brown would begrudgingly have been impressed! raspberry

    Here’s goes the code in effect: http://www.orpheuschoir.org.nz

    Because I’m too cheap to shell out for any commercial software, I semi-hand-code it in NVU. For what I want to do, it works fine.

    Signature

    Laurie Fleming - the singing geek

    @LaurieFleming