[thelist] A controversy about JavaScript

Syed Zeeshan Haider zeeshan_paki at yahoo.com
Fri Mar 8 14:33:13 CST 2002


Hello Experts,
Being not very old in JavaScript, I have come to a controversy.
Look at following:
var theDate=new Date()
var theYear=theDate.getFullYear()
In this chunk I used getFullYear() which works well with IE 5.5, IE 5.0
and NN 4.x but many experts of JS write (as I noticed on WWW) getYear()
instead. Then they write some extra code to meet with Y2K bug.
Which is well? getFullYear() || getYear()
Any suggestions and comments?
Thank you,
Syed Zeeshan Haider.
http://syedzeeshanhaider.faithweb.com/




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




More information about the thelist mailing list