hwg-techniques archives | Jun 2000 | new search | results | previous | next |
RE: JavaScript errorby "Peter-Paul Koch" <gassinaumasis(at)hotmail.com> |
|
>Just use some browser detection.... No, that's not necessary. Besides, you forget NN6 in the script below. >now = new Date(); >ver = (document.layers || document.all) ? 1 : 0; >ver ? year=now.getFullYear() : year=now.getYear(); It's even simpler: var now = new Date(); if (now.getFullYear) Year = now.getFullYear(); else { Year = now.getYear(); if (Year < 2000) Year += 1900 } See http://www.xs4all.nl/~ppk/js under Date and Time for a complete explanation of this millennium proof script. ppk ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA