Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit a3d715b

Browse files
authored
Port Japanese era fix from master (#23113)
1 parent ce47d88 commit a3d715b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/corefx/System.Globalization.Native/calendarData.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ the callback for each value in the collection.
509509
The context parameter is passed through to the callback along with each string.
510510
*/
511511
extern "C" int32_t GlobalizationNative_EnumCalendarInfo(
512-
EnumCalendarInfoCallback callback,
512+
EnumCalendarInfoCallback callback,
513513
const UChar* localeName,
514514
CalendarId calendarId,
515515
CalendarDataType dataType,
@@ -581,7 +581,8 @@ extern "C" int32_t GlobalizationNative_GetLatestJapaneseEra()
581581
if (U_FAILURE(err))
582582
return 0;
583583

584-
int32_t ret = ucal_getLimit(pCal, UCAL_ERA, UCAL_MAXIMUM, &err);
584+
ucal_set(pCal, UCAL_EXTENDED_YEAR, 9999);
585+
int32_t ret = ucal_get(pCal, UCAL_ERA, &err);
585586

586587
return U_SUCCESS(err) ? ret : 0;
587588
}

0 commit comments

Comments
 (0)