Re: Adding "Last Update" notation to a page

by "Comharsa" <comharsa(at)clara.net>

 Date:  Tue, 4 Jan 2000 05:30:41 -0000
 To:  <hwg-basics(at)hwg.org>,
"Charles A Upsdell" <cupsdell(at)torfree.net>
 Cc:  "Kathleen Anderson" <kathleen(at)spiderwebwoman.com>
 References:  istar
  todo: View Thread, Original
> From O'Reilly's "JavaScript, the Definitive Guide, 3rd Edition", published
> June 1998:
>

<snip>

According to Netscape getYear() changed between JS 1.2 and JS 1.3. This is
the main cause of all the problems.

> To work around these strange and incompatible return values, you should
> replace getYear() with a function like:
>
>      getFullYear( d )
>      {
>          var y = d.getYear();
>          if ( y < 1000) y+= 1900;
>          return y;
>      }

<snip>

Not very sensible of O'Reilly in this case as their code uses the same name
as a new method in JS 1.3.

Brian

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA