You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DateTimeFormatInfo.GetEra(string) always returns -1 if you pass abbreviated english era name as input parameter
Steps to reproduce
var ci = new CultureInfo("ja-JP") { DateTimeFormat = { Calendar = new JapaneseCalendar() }};
var jpFormatInfo = ci.DateTimeFormat;
// it returns -1 but expected 4
var result = jpFormatInfo.GetEra("H");
Configuration
Fails on 5.0.100-preview.7.20366.6 Works correctly on any .NET Framework, .Net Core 3.0, .Net Core 3.1, .Net 5 lower than 5.0.100-preview.4.20258.7
x64
Regression
.Net Framework, Core 3.0, Core 3.1 and .Net5 until 5.0.100-preview.4.20258.7
Other information
The reason is System.Globalization.DateTimeFormatInfo.AbbreviatedEnglishEraNames contains not abbreviated but full era names
The text was updated successfully, but these errors were encountered:
DateTimeFormatInfo.GetEra(string) always returns -1 if you pass abbreviated english era name as input parameter
Steps to reproduce
Configuration
Fails on 5.0.100-preview.7.20366.6
Works correctly on any .NET Framework, .Net Core 3.0, .Net Core 3.1, .Net 5 lower than 5.0.100-preview.4.20258.7
x64
Regression
.Net Framework, Core 3.0, Core 3.1 and .Net5 until 5.0.100-preview.4.20258.7
Other information
The reason is System.Globalization.DateTimeFormatInfo.AbbreviatedEnglishEraNames contains not abbreviated but full era names
The text was updated successfully, but these errors were encountered: