private void InitializeAbbreviatedEraNames(string localeName, CalendarId calendarId) { // Note that the saAbbrevEraNames only include "AD" We don't have localized names for other calendars available from windows switch (calendarId) { // For Localized Gregorian we really expect the data from the OS. case CalendarId.GREGORIAN: // Fallback for CoreCLR < Win7 or culture.dll missing if (this.saAbbrevEraNames == null || this.saAbbrevEraNames.Length == 0 || String.IsNullOrEmpty(this.saAbbrevEraNames[0])) { this.saAbbrevEraNames = new String[] { "AD" }; } break; // The rest of the calendars have constant data, so we'll just use that case CalendarId.GREGORIAN_US: case CalendarId.JULIAN: this.saAbbrevEraNames = new String[] { "AD" }; break; case CalendarId.JAPAN: case CalendarId.JAPANESELUNISOLAR: this.saAbbrevEraNames = JapaneseCalendar.AbbrevEraNames(); break; case CalendarId.HIJRI: case CalendarId.UMALQURA: if (localeName == "dv-MV") { // Special case for Divehi this.saAbbrevEraNames = new String[] { "\x0780\x002e" }; } else { this.saAbbrevEraNames = new String[] { "\x0647\x0640" }; } break; case CalendarId.TAIWAN: // Get era name and abbreviate it this.saAbbrevEraNames = new String[1]; if (this.saEraNames[0].Length == 4) { this.saAbbrevEraNames[0] = this.saEraNames[0].Substring(2, 2); } else { this.saAbbrevEraNames[0] = this.saEraNames[0]; } break; default: // Most calendars just use the full name this.saAbbrevEraNames = this.saEraNames; break; } }
private void InitializeAbbreviatedEraNames(string localeName, int calendarId) { switch (((CalendarId)((ushort)calendarId))) { case CalendarId.GREGORIAN: if (((this.saAbbrevEraNames == null) || (this.saAbbrevEraNames.Length == 0)) || string.IsNullOrEmpty(this.saAbbrevEraNames[0])) { this.saAbbrevEraNames = new string[] { "AD" }; } return; case CalendarId.GREGORIAN_US: case CalendarId.JULIAN: this.saAbbrevEraNames = new string[] { "AD" }; return; case CalendarId.JAPAN: case CalendarId.JAPANESELUNISOLAR: this.saAbbrevEraNames = JapaneseCalendar.AbbrevEraNames(); return; case CalendarId.TAIWAN: this.saAbbrevEraNames = new string[1]; if (this.saEraNames[0].Length != 4) { this.saAbbrevEraNames[0] = this.saEraNames[0]; return; } this.saAbbrevEraNames[0] = this.saEraNames[0].Substring(2, 2); return; case CalendarId.HIJRI: case CalendarId.UMALQURA: if (localeName == "dv-MV") { this.saAbbrevEraNames = new string[] { "ހ." }; return; } this.saAbbrevEraNames = new string[] { "هـ" }; return; } this.saAbbrevEraNames = this.saEraNames; }
private void InitializeAbbreviatedEraNames(string localeName, int calendarId) { CalendarId calendarId1 = (CalendarId)calendarId; if ((uint)calendarId1 <= 13U) { switch (calendarId1) { case CalendarId.GREGORIAN: if (this.saAbbrevEraNames != null && this.saAbbrevEraNames.Length != 0 && !string.IsNullOrEmpty(this.saAbbrevEraNames[0])) { return; } this.saAbbrevEraNames = new string[1] { "AD" }; return; case CalendarId.GREGORIAN_US: case CalendarId.JULIAN: this.saAbbrevEraNames = new string[1] { "AD" }; return; case CalendarId.JAPAN: break; case CalendarId.TAIWAN: this.saAbbrevEraNames = new string[1]; if (this.saEraNames[0].Length == 4) { this.saAbbrevEraNames[0] = this.saEraNames[0].Substring(2, 2); return; } this.saAbbrevEraNames[0] = this.saEraNames[0]; return; case CalendarId.HIJRI: goto label_11; default: goto label_19; } } else if (calendarId1 != CalendarId.JAPANESELUNISOLAR) { if (calendarId1 != CalendarId.PERSIAN) { if (calendarId1 == CalendarId.UMALQURA) { goto label_11; } else { goto label_19; } } else { if (this.saAbbrevEraNames != null && this.saAbbrevEraNames.Length != 0 && !string.IsNullOrEmpty(this.saAbbrevEraNames[0])) { return; } this.saAbbrevEraNames = this.saEraNames; return; } } this.saAbbrevEraNames = JapaneseCalendar.AbbrevEraNames(); return; label_11: if (localeName == "dv-MV") { this.saAbbrevEraNames = new string[1] { "ހ." }; return; } this.saAbbrevEraNames = new string[1] { "هـ" }; return; label_19: this.saAbbrevEraNames = this.saEraNames; }
// Token: 0x06002CC1 RID: 11457 RVA: 0x000AAE30 File Offset: 0x000A9030 private void InitializeAbbreviatedEraNames(string localeName, int calendarId) { CalendarId calendarId2 = (CalendarId)calendarId; if (calendarId2 <= CalendarId.JULIAN) { switch (calendarId2) { case CalendarId.GREGORIAN: if (this.saAbbrevEraNames == null || this.saAbbrevEraNames.Length == 0 || string.IsNullOrEmpty(this.saAbbrevEraNames[0])) { this.saAbbrevEraNames = new string[] { "AD" }; return; } return; case CalendarId.GREGORIAN_US: break; case CalendarId.JAPAN: goto IL_96; case CalendarId.TAIWAN: this.saAbbrevEraNames = new string[1]; if (this.saEraNames[0].Length == 4) { this.saAbbrevEraNames[0] = this.saEraNames[0].Substring(2, 2); return; } this.saAbbrevEraNames[0] = this.saEraNames[0]; return; case CalendarId.KOREA: goto IL_14B; case CalendarId.HIJRI: goto IL_A2; default: if (calendarId2 != CalendarId.JULIAN) { goto IL_14B; } break; } this.saAbbrevEraNames = new string[] { "AD" }; return; } if (calendarId2 != CalendarId.JAPANESELUNISOLAR) { if (calendarId2 != CalendarId.PERSIAN) { if (calendarId2 != CalendarId.UMALQURA) { goto IL_14B; } goto IL_A2; } else { if (this.saAbbrevEraNames == null || this.saAbbrevEraNames.Length == 0 || string.IsNullOrEmpty(this.saAbbrevEraNames[0])) { this.saAbbrevEraNames = this.saEraNames; return; } return; } } IL_96: this.saAbbrevEraNames = JapaneseCalendar.AbbrevEraNames(); return; IL_A2: if (localeName == "dv-MV") { this.saAbbrevEraNames = new string[] { "ހ." }; return; } this.saAbbrevEraNames = new string[] { "هـ" }; return; IL_14B: this.saAbbrevEraNames = this.saEraNames; }