我想问一下手动YearMonthPattern
设置CurrentCulture
? 我的问题是我将当前文化设置为Invariant
,然后YearMonthPattern
更改。
我所做的YearMonthPattern
只是在设置文化之后添加代码来设置。
//Set Cultures
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(127);
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(127);
//Set Year Month Pattern
System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.YearMonthPattern = "MMMM, yyyy";