日期:2014-05-18 浏览次数:20545 次
public static int GetWeekOfYear(DateTime dt) { CultureInfo myCI = new CultureInfo("zh-CN"); Calendar myCal = myCI.Calendar; CalendarWeekRule myCWR = myCI.DateTimeFormat.CalendarWeekRule; DayOfWeek myFirstDOW = myCI.DateTimeFormat.FirstDayOfWeek; return myCal.GetWeekOfYear(dt, myCWR, myFirstDOW); }
------解决方案--------------------
using System.Globalization;