I have the following code:
var thursday = new CultureInfo("es-ES").DateTimeFormat.AbbreviatedDayNames[4];
which returns "ju." as expected.
I just inherited a pretty old code that has test code that expects the value to be "jue" ...
I was wondering - has this ever changed in the .NET Framework?
EDIT 1 - Expand:
I am using .Net 4.5 ... I have a newly built machine with Visual Studio 2013 and none of the usual is installed.
var format = new CultureInfo("es-ES").DateTimeFormat; Console.WriteLine("AbbreviatedDayNames:"); foreach (var name in format.AbbreviatedDayNames) { Console.WriteLine(name); } Console.WriteLine("ShortestDayNames:"); foreach (var name in format.ShortestDayNames) { Console.WriteLine(name); }
Outputs:
AbbreviatedDayNames: do. lu. ma. mi. ju. vi. sΓ‘. ShortestDayNames: D L M X J V S
Edit 2 - My car is English, although I donβt understand why it matters if I specify the culture as βes-ESβ?
Change 3 is weird:
https://dotnetfiddle.net/ - returns ju.
http://www.compileonline.com/compile_csharp_online.php - returns jue
source share