You've already forked linux-packaging-mono
Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
parent
8016999e4d
commit
64ac736ec5
@ -239,6 +239,9 @@ namespace System.Globalization
|
||||
case "zh":
|
||||
waCalendars = new int[] { calendarId, Calendar.CAL_TAIWAN };
|
||||
break;
|
||||
case "he":
|
||||
waCalendars = new int[] { calendarId, Calendar.CAL_HEBREW };
|
||||
break;
|
||||
default:
|
||||
waCalendars = new int [] { calendarId };
|
||||
break;
|
||||
@ -249,6 +252,14 @@ namespace System.Globalization
|
||||
}
|
||||
}
|
||||
|
||||
internal CalendarId[] GetCalendarIds()
|
||||
{
|
||||
var items = new CalendarId[CalendarIds.Length];
|
||||
for (int i = 0; i < CalendarIds.Length; i++)
|
||||
items[i] = (CalendarId)CalendarIds[i];
|
||||
return items;
|
||||
}
|
||||
|
||||
internal bool IsInvariantCulture {
|
||||
get {
|
||||
return string.IsNullOrEmpty (sRealName);
|
||||
@ -433,6 +444,19 @@ namespace System.Globalization
|
||||
// Date separator (derived from short date format)
|
||||
internal String DateSeparator(int calendarId)
|
||||
{
|
||||
#if MONO // see https://github.com/dotnet/coreclr/pull/19976
|
||||
if (calendarId == (int)CalendarId.JAPAN && !AppContextSwitches.EnforceLegacyJapaneseDateParsing)
|
||||
{
|
||||
// The date separator is derived from the default short date pattern. So far this pattern is using
|
||||
// '/' as date separator when using the Japanese calendar which make the formatting and parsing work fine.
|
||||
// changing the default pattern is likely will happen in the near future which can easily break formatting
|
||||
// and parsing.
|
||||
// We are forcing here the date separator to '/' to ensure the parsing is not going to break when changing
|
||||
// the default short date pattern. The application still can override this in the code by DateTimeFormatInfo.DateSeparartor.
|
||||
return "/";
|
||||
}
|
||||
#endif
|
||||
|
||||
return GetDateSeparator(ShortDates(calendarId)[0]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user