Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTarek Mahmoud Sayed <tarekms@microsoft.com>2018-03-02 03:36:39 +0300
committerJan Kotas <jkotas@microsoft.com>2018-03-02 12:32:21 +0300
commite896db3c3327bb08a698943fe794b698816c1fa4 (patch)
tree71cb956837ccbaec5f629e94127d9b1842b11cbb
parent0df42ba839844da4fa4fc6a391af452b266f8ebb (diff)
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 <dotnet-bot@microsoft.com>
-rw-r--r--src/System.Private.CoreLib/shared/System/Globalization/CalendarData.Unix.cs7
1 files changed, 7 insertions, 0 deletions
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);