[Javascript] ARGH! Help with Dates!

Hassan Schroeder hassan at webtuitive.com
Fri Jan 2 13:59:43 CST 2004


Dave Stoltz wrote:
> Thanks - then actually I just need to add 1 do the month, then my code 
> works...

Uh, well, not quite -- if you really want

 > EXACTLY this format: 1/4/2004 5:45 PM

you'll need to change this
>      y = cDate.getYear();

to
	y = cDate.getFullYear();

Otherwise you'll get 1/4/104 in Netscape/Mozilla  :-)

FWIW!
-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.






More information about the Javascript mailing list