Results 1 to 4 of 4
  1. #1
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Wrong date from Javascript

    Can anyone correct this code, which I found on a website, which gave the result
    Copyright
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Wrong date from Javascript

    Try getFullYear().

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Wrong date from Javascript

    By the way, the copyright year date, at least in these United States from where I write, should be the year of the last update, and not necessarily the current year. JavaScript has document.lastModified, which either will be the actual date or a zero, but adding this code will update that date! <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

  4. #4
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Wrong date from Javascript

    Thanks to both of you!

    Does the function Stamp.getYear work from 1900 as its base ?

    John

    PS I know absolutely nothing about JavaScript!

    PPS The original coding gives 105 in Firefox ... BUT 2005 in IE (I just discovered)!
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •