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

Commit

Permalink
Port Japanese era fix from master (#23108)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekgh authored Mar 14, 2019
1 parent 9848919 commit 5ed44a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/corefx/System.Globalization.Native/calendarData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ the callback for each value in the collection.
The context parameter is passed through to the callback along with each string.
*/
extern "C" int32_t GlobalizationNative_EnumCalendarInfo(
EnumCalendarInfoCallback callback,
EnumCalendarInfoCallback callback,
const UChar* localeName,
CalendarId calendarId,
CalendarDataType dataType,
Expand Down Expand Up @@ -581,7 +581,8 @@ extern "C" int32_t GlobalizationNative_GetLatestJapaneseEra()
if (U_FAILURE(err))
return 0;

int32_t ret = ucal_getLimit(pCal, UCAL_ERA, UCAL_MAXIMUM, &err);
ucal_set(pCal, UCAL_EXTENDED_YEAR, 9999);
int32_t ret = ucal_get(pCal, UCAL_ERA, &err);

return U_SUCCESS(err) ? ret : 0;
}
Expand Down

0 comments on commit 5ed44a2

Please sign in to comment.