From e896db3c3327bb08a698943fe794b698816c1fa4 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Thu, 1 Mar 2018 16:36:39 -0800 Subject: Fix Adar month name in Hebrew calendar (dotnet/coreclr#16697) The returned data from ICU has 6th month name as 'Adar I' and 7th month name as 'Adar' We need to adjust that in the list used with non-leap year to have 6th month as 'Adar' and 7th month as 'Adar II' note that when formatting non-leap year dates, 7th month shouldn't get used at all. Signed-off-by: dotnet-bot --- .../shared/System/Globalization/CalendarData.Unix.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/System.Private.CoreLib/shared/System/Globalization/CalendarData.Unix.cs b/src/System.Private.CoreLib/shared/System/Globalization/CalendarData.Unix.cs index 926eaa13d..17d6ed7a0 100644 --- a/src/System.Private.CoreLib/shared/System/Globalization/CalendarData.Unix.cs +++ b/src/System.Private.CoreLib/shared/System/Globalization/CalendarData.Unix.cs @@ -54,6 +54,13 @@ namespace System.Globalization Debug.Assert(calendarId == CalendarId.HEBREW && saMonthNames.Length == 13); saLeapYearMonthNames = (string[]) saMonthNames.Clone(); saLeapYearMonthNames[6] = leapHebrewMonthName; + + // The returned data from ICU has 6th month name as 'Adar I' and 7th month name as 'Adar' + // We need to adjust that in the list used with non-leap year to have 6th month as 'Adar' and 7th month as 'Adar II' + // note that when formatting non-leap year dates, 7th month shouldn't get used at all. + saMonthNames[5] = saMonthNames[6]; + saMonthNames[6] = leapHebrewMonthName; + } result &= EnumMonthNames(localeName, calendarId, CalendarDataType.AbbrevMonthNames, out this.saAbbrevMonthNames, ref leapHebrewMonthName); result &= EnumMonthNames(localeName, calendarId, CalendarDataType.MonthGenitiveNames, out this.saMonthGenitiveNames, ref leapHebrewMonthName); -- cgit v1.2.3