Does DateTimeFormatInfo :: AbbreviatedDayNames ever change in .Net versions of Spain?

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

+6
source share
1 answer

The CalendarData object transitions from C # to C ++ when retrieving calendar data on its way to retrieving calendar information from the OS.

Changes in the OS version and settings for the values ​​in the array will be the reason for this, and not the actual .NetFX change.

You can refer to the C # frame code at http://www.dotnetframework.org/default.aspx/ 4@0 / 4@0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Globalization / CalendarData@cs / 1305376 / CalendarData@cs and mark the method with the connection enabled.

+1
source

Source: https://habr.com/ru/post/978132/


All Articles