-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-System.Globalizationhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors
Milestone
Description
Description
TryParseExact works not as expected in net8. The code works correctly in net4.7.2
Reproduction Steps
Sample code
var foo = "Dez.20";
var culture = new CultureInfo("de-DE");
DateTime bar;
var parsed = DateTime.TryParseExact(foo, "MMM.yy", culture, DateTimeStyles.None, out bar);
Console.WriteLine("Parsed:" + parsed);Expected behavior
The string gets parsed to DateTime 2020-12-01
Actual behavior
The string does not get parsed
Regression?
The code works in net4.7.2 and net4.8. It does no longer work in net6/8/9
Known Workarounds
No response
Configuration
Tested in net6/8/9 on Windows 10 x64
Other information
No response
elgonzo
Metadata
Metadata
Assignees
Labels
area-System.Globalizationhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors