To avoid "millennium bugs", take into account the following:
Date.getYear()method returns the full four-digit year for the year 2000 and all subsequent years
The following code fragment sets the correct four-digit year in all browsers:
theDate = new Date(); theYear = theDate.getYear(); if (theYear<1900) theYear=theYear+1900;Better yet, instead of
Date.getYear()use the the
Date.getFullYear()method. It is supported in all modern browsers and consistently returns the four-digit year.