This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Web Authoring Tools > January 2005 > Javascript will not display date correctly in FIREFOX, ok in EXPLORER





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Javascript will not display date correctly in FIREFOX, ok in EXPLORER
kroger@princeton.edu

2005-01-28, 11:18 pm

Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.
Thanks for any help,
Jim

McKirahan

2005-01-28, 11:18 pm

<kroger@princeton.edu> wrote in message
news:1106961495.669881.20920@z14g2000cwz.googlegroups.com...
> Hi. I am at a loss to decipher why the javascript on my web page:
>
> http://www.psych.nmsu.edu/~jkroger/lab/index.html
>
> does not display the date correctly in Firefox. Instead of "2005" for
> the year,
> it displays "105" ... however, in IE Explorer, it looks fine.
> Thanks for any help,
> Jim
>


Change
year = now.getYear();
to
year = now.getFullYear();


McKirahan

2005-01-28, 11:18 pm

"McKirahan" <News@McKirahan.com> wrote in message
news:obWdnaw25LX7dGfcRVn-3A@comcast.com...
> <kroger@princeton.edu> wrote in message
> news:1106961495.669881.20920@z14g2000cwz.googlegroups.com...
>
> Change
> year = now.getYear();
> to
> year = now.getFullYear();


getYear and getFullYear
http://www.quirksmode.org/js/datecompat.html

http://www.codecomments.com/asp/mes...=2978&r=3701766


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews