Issue 115: getyear return wired value http://code.google.com/p/v8/issues/detail?id=115
Comment #2 by [EMAIL PROTECTED]: Thank you for the report. The result of 108 is actually deliberate. It is value printed by both Firefox and Safari, and what the ECMAScript standard recommends for the (non-standardized) getYear method. Where different JavaScript engines disagree on a feature, V8 generally try to be compatible with Safari's JavaScript Core implementation. If it's code you control, I recommend using the getFullYear method instead, and only if that one isn't available (a browser from before JavaScript 1.3 or JScript 3) to fall back on getYear. The difference in behavior between IE/Opera and the rest can be reduced by changing the test to (year < 200), but that's just a hack that will eventually fail in the year 2100, or if working with dates in the second century. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
