@nickfitz said:@HeroreV said:@mattwho said:Of course this was fixed with theYear = today.getYear();ECMA-262 specifies that getYear() should return the number of years since 1900. Although Internet Explorer doesn't comply, Opera and Firefox do, so the code is still broken. The code aquanight posted works around this problem.The code aquanight posted solves the wrong problem. The real WTF is that getYear() is deprecated (and has been since about 1997), and getFullYear() should be used instead.Correct.  Forget getYear. only use getFullYear. I'm not sure in what situation a two-digit year is useful -- especially since we still live near the millennium turn.Assuming javascript is sane and casts boolean true/false to integer 1/0 nicely (as opposed to VB's -1/0)Correct.Essay Answers!The sanity of implicitly casting a real, existing number to boolean is debatable. I'd prefer that if (0) { print "pass"; } would pass, because 0 exists, but an explicit (bool) 0; would create false. Because the thing is, sometimes 0 is a valid, informative value for a variable, and you only want the null value to fail the if.But perhaps that's largely academic, because a var that should contain a real number (such as a loopCount or priceMultiplier) should also, by proper program design, never contain null, and never exist alone in a cold if check.