[Webkit-unassigned] [Bug 130123] Incorrect Date returned between 3.1.2034 and 31.12.2099
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 12 09:51:48 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=130123
Mark Lam <mark.lam at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #226502|review? |review-
Flag| |
--- Comment #2 from Mark Lam <mark.lam at apple.com> 2014-03-12 09:51:34 PST ---
(From update of attachment 226502)
View in context: https://bugs.webkit.org/attachment.cgi?id=226502&action=review
Can you add a regression test to show that the old code is broken and to confirm that the new code is working?
> Source/WTF/wtf/DateMath.cpp:520
> + int mday = firstDayOfMonth[(isLeapYear(year) ? 1 : 0)][mon -1 ];
You don’t need the ?: expression. "isLeapYear(year)” is adequate. http://en.cppreference.com/w/cpp/language/implicit_cast states that a bool will be converted to a 0 or a 1.
Also, the webkit style guide says you should have a space between “mon” and “1” in “mon -1”. “[mon -1 ]” should be “[mon - 1]”.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list