网上看好多人拿个DateTime类自己计算周,感觉不爽
下面这个还比较简单。。
System.Globalization.GregorianCalendar gc = new System.Globalization.GregorianCalendar();
string strWeek=gc.GetWeekOfYear(DateTime.Now, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Monday).ToString();
搞定。。