Going crazy - browser date problems

WillR

Earning My Ears
Joined
Aug 19, 1999
Messages
29
Hi,

I'm going crazy trying to figure this out and hoping maybe some one knows the answer or can point me in the right direction.

I have a web site that I want to add a date to - I want it to be formatted like this: January 22, 2002.

I'm working in Dreamweaver and I found a JavaScript code that works great but only in Explorer. When I preview the page in Netscape the date looks like this: January 22, 102

Any ideas? I know my Netscape is outdates (4.51) but ideally I would like the date to work in this version since some people are still using it.

I'm pretty sure the part of the code creating the problem is this:
return months[date.getMonth()] + " " +
date.getDate() + ", " + (+ date.getYear());


Any help or suggestions are greatly appreciated.
Thanks
 
Hi,

I think I did it:

return months[date.getMonth()] + " " +
date.getDate() + ", " + (+ date.getYear());

changed to:

return months[date.getMonth()] + " " +
date.getDate() + ", " + "2002";

Seems to do the trick - at least for the rest of 2002 - I can live with that!
 

Disney Vacation Planning. Free. Done for You.
Our Authorized Disney Vacation Planners are here to provide personalized, expert advice, answer every question, and uncover the best discounts. Let Dreams Unlimited Travel take care of all the details, so you can sit back, relax, and enjoy a stress-free vacation.
Start Your Disney Vacation
Disney EarMarked Producer






DIS Facebook DIS youtube DIS Instagram DIS Pinterest DIS Tiktok DIS Twitter

Add as a preferred source on Google

Back
Top Bottom