Reviewers: Mads Ager, Description: Make sure that data functions return 0 instead of -0 for a number of date functions such as getHours for dates before 1970.
This is consistent with the behavior of other JavaScript engines. Please review this at http://codereview.chromium.org/9770 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/date-delay.js Index: src/date-delay.js =================================================================== --- src/date-delay.js (revision 730) +++ src/date-delay.js (working copy) @@ -50,6 +50,8 @@ // ECMA 262 - 5.2 function Modulo(value, remainder) { var mod = value % remainder; + // Guard against returning -0. + if (mod == 0) return 0; return mod >= 0 ? mod : mod + remainder; } --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
