diff --git a/intl/icu/source/i18n/hebrwcal.cpp b/intl/icu/source/i18n/hebrwcal.cpp --- a/intl/icu/source/i18n/hebrwcal.cpp +++ b/intl/icu/source/i18n/hebrwcal.cpp @@ -441,19 +441,18 @@ int32_t startOfYear(int32_t year, UError day = months * 29LL + frac / DAY_PARTS; // Whole # part of calculation frac = frac % DAY_PARTS; // Time of day int32_t wd = (day % 7); // Day of week (0 == Monday) if (wd == 2 || wd == 4 || wd == 6) { // If the 1st is on Sun, Wed, or Fri, postpone to the next day day += 1; - wd = (day % 7); } - if (wd == 1 && frac > 15*HOUR_PARTS+204 && !HebrewCalendar::isLeapYear(year) ) { + else if (wd == 1 && frac > 15*HOUR_PARTS+204 && !HebrewCalendar::isLeapYear(year) ) { // If the new moon falls after 3:11:20am (15h204p from the previous noon) // on a Tuesday and it is not a leap year, postpone by 2 days. // This prevents 356-day years. day += 2; } else if (wd == 0 && frac > 21*HOUR_PARTS+589 && HebrewCalendar::isLeapYear(year-1) ) { // If the new moon falls after 9:32:43 1/3am (21h589p from yesterday noon) // on a Monday and *last* year was a leap year, postpone by 1 day.