Commit 103db91e authored by ager@chromium.org's avatar ager@chromium.org

Add parens to DateYMDFromTimeSlow to clearify.

BUG=649
Review URL: http://codereview.chromium.org/1132002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2726a4d4
......@@ -5731,11 +5731,11 @@ static inline void DateYMDFromTimeSlow(int date,
bool is_leap = (!yd1 || yd2) && !yd3;
ASSERT(date >= -1);
ASSERT(is_leap || date >= 0);
ASSERT(date < 365 || is_leap && date < 366);
ASSERT(is_leap == (year % 4 == 0 && (year % 100 || (year % 400 == 0))));
ASSERT(is_leap || MakeDay(year, 0, 1) + date == save_date);
ASSERT(!is_leap || MakeDay(year, 0, 1) + date + 1 == save_date);
ASSERT(is_leap || (date >= 0));
ASSERT((date < 365) || (is_leap && (date < 366)));
ASSERT(is_leap == ((year % 4 == 0) && (year % 100 || (year % 400 == 0))));
ASSERT(is_leap || ((MakeDay(year, 0, 1) + date) == save_date));
ASSERT(!is_leap || ((MakeDay(year, 0, 1) + date + 1) == save_date));
if (is_leap) {
day = kDayInYear[2*365 + 1 + date];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment