We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3bf9f8 commit 48cc878Copy full SHA for 48cc878
icu4c/source/i18n/persncal.cpp
@@ -217,7 +217,8 @@ int32_t PersianCalendar::handleGetExtendedYear(UErrorCode& status) {
217
* method is called.
218
*/
219
void PersianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) {
220
- int64_t daysSinceEpoch = julianDay - PERSIAN_EPOCH;
+ int64_t daysSinceEpoch = julianDay;
221
+ daysSinceEpoch -= PERSIAN_EPOCH;
222
int64_t year = ClockMath::floorDivideInt64(
223
33LL * daysSinceEpoch + 3LL, 12053LL) + 1LL;
224
if (year > INT32_MAX || year < INT32_MIN) {
0 commit comments