]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/islamcal.cpp
ICU-59180.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / islamcal.cpp
index 4fd0e07d920746d08dd3e2086a52bd4dca818298..b84bedfa0916b170cd2a86514fe740cb8a8a03be 100644 (file)
@@ -614,7 +614,7 @@ void IslamicCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status)
             days = julianDay - ASTRONOMICAL_EPOC;
         }
         // Use the civil calendar approximation, which is just arithmetic
-        year  = (int)ClockMath::floorDivide( (double)(30 * days + 10646) , 10631.0 );
+        year  = (int32_t)ClockMath::floorDivide(30 * (int64_t)days + 10646, (int64_t)10631);
         month = (int32_t)uprv_ceil((days - 29 - yearStart(year)) / 29.5 );
         month = month<11?month:11;
         startDate = monthStart(year, month);