[webkit-reviews] review denied: [Bug 130123] Incorrect Date returned between 3.1.2034 and 31.12.2099 : [Attachment 226502] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 12 09:51:10 PDT 2014


Mark Lam <mark.lam at apple.com> has denied Byungseon Shin <sun.shin at lge.com>'s
request for review:
Bug 130123: Incorrect Date returned between 3.1.2034 and 31.12.2099
https://bugs.webkit.org/show_bug.cgi?id=130123

Attachment 226502: Patch
https://bugs.webkit.org/attachment.cgi?id=226502&action=review

------- Additional Comments from Mark Lam <mark.lam at apple.com>
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]”.


More information about the webkit-reviews mailing list